Version zu Ende April 2023

This commit is contained in:
Klaus Wendel, archium GmbH 2023-05-03 09:06:13 +02:00
commit f967f4698f
425 changed files with 112793 additions and 0 deletions

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
# Basic Go makefile
#CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-w -extldflags "-static"' -o Toolbox *.go
#GOCMD=GOOS=js GOARCH=wasm go
#GOCMD=go
GOCMD=CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
all: build wasm
build:
$(GOBUILD) -a -ldflags '-w -extldflags "-static"' -v -o Toolbox *.go
dbg-build:
$(GOBUILD) -v -gcflags=all="-N -l" -tags debug
test:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
wasm:
exec make -C ./goMetrix/app.wasm/ all &

BIN
Toolbox Executable file

Binary file not shown.

2
build.js Normal file
View File

@ -0,0 +1,2 @@
// put your build process in here.
console.log("my build process");

314
defaults/defaults.go Normal file
View File

@ -0,0 +1,314 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package defaults
import (
// "errors"
"fmt"
"io/ioutil"
"log"
"os"
"strconv"
"strings"
// "time"
//
gjs "github.com/tidwall/gjson"
)
// DEF_log == 0 -> log aus
const DEF_lognone = 0 // -> log aus
const DEF_logerro = 1 // -> log an + fehler
const DEF_logwarn = 2 // -> log an + warnungen
const DEF_loginfo = 3 // -> log an + nachrichten
const DEF_logdebg = 4 // -> log an + alles
var DEF_log int = DEF_logerro // >0 = log an
var DEF_alias string = ":root" // start.alias
var DEF_apikey string = "00000000-0000-0000-0000-000000000000" // start.apikey
var DEF_siteurl string = "http://127.0.0.1:8080" // start.siteurl
var DEF_routeurl string = "https://planetary-data-portal.org" // start.routeurl
var DEF_idletime float64 = 1800 // start.release (sekunden)
var DEF_codebase string = "static" // root für verzeichnisse
var DEF_toolboxdirs string = ";/fubagDataset;" //
var DEF_metrixdirs string = "/fubagMetrix" // replacement for former metrixToolbox
var DEF_wasmdirs_www string = "/wasm/"
var DEF_wasmdirs_fs string = "static/wasm"
var DEF_httphost string = "127.0.0.1"
var DEF_httpport int = 8085
var DEF_dbhost string = "127.0.0.1"
var DEF_dbport int = 6414
var DEF_dbuser string = "postgres"
var DEF_dbpassword string = "postgres"
var DEF_dbname string = "fubagTools"
const DEF_dateISO = "2006-01-02"
const DEF_timeISO = "15:04:05"
const DEF_stampISO = "2006-01-02 15:04:05"
const (
DEF_customerid = 1
DEF_project = "archium"
DEF_coninfo = "sslmode=disable host=%s port=%d user=%s password=%s dbname=%s sslmode=disable"
DEF_schema = "html"
DEF_tablecustomer = "html_customer"
DEF_tablelayout = "html_layout"
DEF_tablecontent = "html_content"
DEF_fieldsiteurl = "hla_siteurl"
DEF_fieldrouteurl = "hla_routeurl"
DEF_fieldlayout = "hla_layout"
DEF_fieldsource = "hla_source"
DEF_fieldcontent = "hco_content"
DEF_fieldalias = "hcu_aliasroot"
DEF_fieldapikey = "hcu_apikey"
DEF_fieldidletime = "hcu_idleseconds"
DEF_fieldproject = "hcu_project"
DEF_sqllayout = "SELECT hcu.*, hla.* " +
"FROM %schema%.%tablecustomer% hcu " +
"LEFT JOIN %schema%.%tablelayout% hla ON hla.hla_customerid = hcu.hcu_customerid " +
"WHERE hcu.hcu_customerid = %customerid%;"
DEF_sqlcontent = "SELECT hcu.*, hla.*, hco.* " +
"FROM %schema%.%tablecustomer% hcu " +
"LEFT JOIN %schema%.%tablelayout% hla ON hla.hla_customerid = hcu.hcu_customerid " +
"LEFT JOIN %schema%.%tablecontent% hco ON hco.hco_customerid = hcu.hcu_customerid " +
"WHERE hcu.hcu_customerid = %customerid% AND hco.hco_type = '%type%' " +
"ORDER BY hco_layoutid ASC, hco_contentid ASC;"
DEF_sqlproject = "SELECT hcu.* " +
"FROM %schema%.%tablecustomer% hcu " +
"WHERE hcu.hcu_customerid = %customerid%;"
DEF_sqlgetjson = "SELECT html.\"GetJson\";('%json%');"
DEF_sqlgetsvg = "SELECT * FROM html.\"GetSvg\"(%shadow%,%width%,%height%,'%matrix%','%viewbox%','%names%');"
//
DEF_sqlUserParam = "id,userIdentifier,lastName,firstName"
DEF_sqlUserAdd = "SELECT html.\"AddUser\"('%id%', '%userIdentifier%', '%lastName%', '%firstName%');"
)
func MenuRoot(_alias, _name string) string {
return "{\n" + //
"\t"success": true,\n" + //
"\t"rows":[{\n" + //
"\t\t"id":1,\n" + //
"\t\t"text":"" + _name + "",\n" + // start-dataverse
"\t\t"iconCls":"icon-package",\n" +
"\t\t"attributes":{"level":1,"alias":"" + _alias + "","name":"" + _name + "","datasetPid":"%datasetPid%"},\n" + //
"\t\t"children":%children%\n" + //
"\t}]\n" + //
"}"
}
func MenuChildDataverse() string {
return "{\n" + //
"%tabb%"id":%id%,\n" + //
"%tabb%"text":"%count%%title%",\n" + //
"%icon%" + //
"%tabb%"attributes":{"level":%level%,"type":"%type%"," + //
""title":"%title%","alias":"%alias%","name":"%name%"},\n" + //
"%tabb%"children":%children%\n" + //
"%taba%}"
}
func MenuChildDataset() string {
return "{\n" +
"%tabb%"id":%id%,\n" + //
"%tabb%"text":"%count%%title%",\n" + //
"%icon%" + //
"%tabb%"attributes":{"level":%level%,"type":"%type%"," + //
""datasetPid":"%datasetPid%","datasetId":"%datasetId%"," + //
""title":"%title%","subject":%subjects%},\n" + //
"%tabb%"children":%children%\n" + //
"%taba%}"
}
func MenuChildFile() string {
return "{\n" + //
"%tabb%"id":%id%,\n" + //
"%tabb%"text":"%label%",\n" + //
"%icon%" + //
"%tabb%"attributes":{"level":%level%,"type":"%type%"},\n" + //
"%tabb%"children":[]\n" + //
"%taba%}"
}
func MenuChildFileSimple() string {
return "{\n" + //
"%tabb%"text":"%label%",\n" + //
"%icon%" + //
"%tabb%"attributes":{"level":%level%,"type":"%type%"},\n" + //
"%tabb%"children":[]\n" + //
"%taba%}"
}
func MenuChildUser() string {
return "{\n" +
"\t"id":%id%,\n" +
"\t"text":"%name%",\n" +
"\t"attributes":{"level":%level%,"lastname":"%lastname%","firstname":"%firstname%"}\n" +
"}"
}
func LogToggle(_logging int) int {
oldlog := DEF_log
//
if _logging != 0 {
log.SetOutput(os.Stdout)
} else {
log.SetOutput(ioutil.Discard)
}
DEF_log = _logging
//
return oldlog
}
func LogMessage(_label, _message string, _loglevel int) {
if _loglevel > 0 {
if _loglevel <= DEF_log {
// DEF_log == 1 -> log an + fehler
// DEF_log == 2 -> log an + warnungen
// DEF_log == 3 -> log an + nachrichten
// DEF_log == 4 -> log an + mimimi
if len(_label) > 0 {
switch _loglevel {
case 1:
log.Printf("( ERROR ) > %v: %v \n", _label, _message)
case 2:
log.Printf("( WARN ) > %v: %v \n", _label, _message)
case 3:
log.Printf("( INFO ) > %v: %v \n", _label, _message)
case 4:
log.Printf("( DEBG ) > %v: %v \n", _label, _message)
}
} else {
switch _loglevel {
case 1:
log.Printf("( ERROR ) > %v \n", _message)
case 2:
log.Printf("( WARN ) > %v \n", _message)
case 3:
log.Printf("( INFO ) > %v \n", _message)
case 4:
log.Printf("( DEBG ) > %v \n", _message)
}
}
}
}
}
func LogMessage2Level(_label, _message string, _loglevel int) {
oldlog := LogToggle(_loglevel)
LogMessage(_label, _message, _loglevel)
LogToggle(oldlog)
}
func LogError(_label string, _error error) {
oldlog := LogToggle(1)
LogMessage(_label, fmt.Sprintf("%v", _error), DEF_logerro)
LogToggle(oldlog)
}
func GetArguments() {
allArgs := os.Args[1:]
if len(allArgs) > 0 {
log.Println("Initialize package - Parameter..")
//LogToggle(1)
for i, vparam := range allArgs {
mparam := strings.Split(vparam, ":")
switch mparam[0] {
case "log":
iint, err := strconv.Atoi(mparam[1])
if err == nil {
LogToggle(1)
log.Printf("\t[%v]: '%v:%v'\n", i, mparam[0], mparam[1])
LogToggle(iint)
continue
}
case "host":
DEF_httphost = mparam[1]
case "port":
iint, err := strconv.Atoi(mparam[1])
if err == nil {
DEF_httpport = iint
}
case "codebase":
DEF_codebase = mparam[1]
case "toolboxdirs":
DEF_toolboxdirs = mparam[1]
case "metrixdirs":
DEF_metrixdirs = mparam[1]
case "dbpassword":
DEF_dbpassword = mparam[1]
case "dbuser":
DEF_dbuser = mparam[1]
case "dbname":
DEF_dbname = mparam[1]
case "dbhost":
DEF_dbhost = mparam[1]
case "dbport":
iint, err := strconv.Atoi(mparam[1])
if err == nil {
DEF_dbport = iint
}
case "dataverse":
DEF_alias = mparam[1]
default:
oldlog := LogToggle(DEF_logerro)
LogMessage("GetArguments()", fmt.Sprintf("\t[%v]: '%v:%v' is unknown.\n", i, mparam[0], mparam[1]), DEF_logerro)
LogToggle(oldlog)
continue
}
//log.Printf("\t[%v]: '%v:%v'\n", i, mparam[0], mparam[1])
}
}
}
// fehler bereitstellen (momentan 20210316)
func get_error(_error string, _type string) string {
json := "\t" + `"success":false,` + "\n"
json = json + "\t" + `"msg":` + "{\n"
status := gjs.Get(_error, "status")
if status.String() == "ERROR" {
message := gjs.Get(_error, "message")
if len(message.String()) > 0 {
json = json + "\t\t" + `"title"` + ":" + `"Error"` + ",\n"
json = json + "\t\t" + `"msg"` + ":" + `"%message%"` + ",\n"
json = json + "\t\t" + `"type"` + ":" + `"%type%"`
json = strings.Replace(json, "%message%", strings.Replace(message.String(), "&#34;", "'", -1), -1)
json = strings.Replace(json, "%type%", _type, -1)
}
} else {
if status.Type == gjs.Null {
message := fmt.Sprintf("%v", _error)
if len(message) > 0 {
json = json + "\t\t" + `"title"` + ":" + `"Error"` + ",\n"
json = json + "\t\t" + `"msg"` + ":" + `"%message%"` + ",\n"
json = json + "\t\t" + `"type"` + ":" + `"%type%"`
json = strings.Replace(json, "%message%", strings.Replace(message, "&#34;", "'", -1), -1)
json = strings.Replace(json, "%type%", _type, -1)
}
}
}
json = json + "\n\t}"
//
return json
}
func GetError(_error error, _type, _label string) string {
//
sjson := "{\n" + get_error(fmt.Sprintf("%v:<BR><BR> %v", _label, _error), _type) + "\n}"
//
return sjson
}
func GetErrorByString(_error, _type, _label string) string {
//
sjson := get_error(fmt.Sprintf("%v:<BR><BR> %v", _label, _error), _type)
//
return sjson
}

View File

@ -0,0 +1,157 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package connect
import (
"bytes"
"encoding/json"
"fmt"
"log"
// "log"
"io/ioutil"
"net/http"
"strings"
// "net/url"
def "Toolbox/defaults"
tol "Toolbox/goDataverse/tools"
)
func GetRequest(url string, params, header tol.ColMap) ([]byte, error) {
client := &http.Client{}
req, _ := http.NewRequest("GET", url, nil)
for k, v := range header {
req.Header.Add(k, v)
}
query := req.URL.Query()
for k, v := range params {
query.Add(k, v)
}
req.URL.RawQuery = query.Encode()
def.LogMessage("GetRequest(url.encode)", url, def.DEF_logdebg)
res, err := client.Do(req)
if err != nil {
def.LogError("GetRequest(do)", err)
} else {
defer res.Body.Close()
b, err := ioutil.ReadAll(res.Body)
if err == nil {
return b, err
}
}
return []byte(""), err
}
func GetRequestMap(_url string, params tol.ColMapInt, header tol.ColMap) ([]byte, error) {
client := &http.Client{}
// _url = _url + "&fq=(title:1)"
// _url = strings.Replace(_url, "*", `((title:2.+OR+title:Ebene))`, -1)
def.LogMessage("GetRequestMap(map)", _url, def.DEF_logdebg)
req, _ := http.NewRequest("GET", _url, nil)
for k, v := range header {
req.Header.Add(k, v)
}
query := req.URL.Query()
for _, ival := range params {
for k, v := range ival {
def.LogMessage("GetRequestMap(values)", fmt.Sprintf("%v: %v (%v)", k, v, ival), def.DEF_logdebg)
query.Add(k, v)
}
}
//
req.URL.RawQuery = query.Encode()
def.LogMessage("GetRequestmap(encode)", req.URL.String(), def.DEF_logdebg)
req.URL.RawQuery = strings.Replace(req.URL.RawQuery, "_q_=", "q=", -1)
def.LogMessage("GetRequestMap(replac)", req.URL.String(), def.DEF_logdebg)
res, err := client.Do(req)
if err == nil {
defer res.Body.Close()
b, err := ioutil.ReadAll(res.Body)
if err == nil {
return b, err
}
}
return []byte(""), err
}
func PostRequest(url string, params, header tol.ColMap) ([]byte, error) {
client := &http.Client{}
postData, err := json.Marshal(params)
def.LogMessage("PostRequest(data)", fmt.Sprintf("%v", postData), def.DEF_logdebg)
req, _ := http.NewRequest("POST", url, bytes.NewReader(postData))
if err == nil {
for k, v := range header {
req.Header.Add(k, v)
}
res, err := client.Do(req)
if err == nil {
defer res.Body.Close()
b, err := ioutil.ReadAll(res.Body)
if err == nil {
return b, err
}
}
}
return []byte(""), err
}
func PostRequestB(url string, postData []byte, header tol.ColMap) ([]byte, error) {
client := &http.Client{}
req, err := http.NewRequest("POST", url, bytes.NewReader(postData))
if err == nil {
for k, v := range header {
req.Header.Add(k, v)
}
res, err := client.Do(req)
if err == nil {
defer res.Body.Close()
b, err := ioutil.ReadAll(res.Body)
return b, err
}
}
return []byte(""), err
}
func DeleteRequest(url string, header tol.ColMap) ([]byte, error) {
client := &http.Client{}
req, _ := http.NewRequest("DELETE", url, nil)
for k, v := range header {
req.Header.Add(k, v)
}
def.LogMessage("DeleteRequest(url)", req.URL.String(), def.DEF_logdebg)
res, _ := client.Do(req)
//def.LogMessage("DeleteRequest(do)", res.Request.Header., def.DEF_logdebg)
b, err := ioutil.ReadAll(res.Body)
res.Body.Close()
return b, err
}
func Redirect(_w http.ResponseWriter, _r *http.Request, _url string) {
// remove/add not default ports from _r.Host
target := _url
// if len(_r.URL.RawQuery) > 0 {
// target += "?" + _r.URL.RawQuery
// }
log.Printf("redirect to: %s", target)
reponse, err := http.Get(_url)
body, err := ioutil.ReadAll(reponse.Body)
if err != nil {
panic(err)
}
fmt.Println("response body", reponse.Body)
_w.Write(body)
log.Printf("redirect to: %s, %v, %v", target, string(body), err)
//http.Redirect(_w, _r, target, http.StatusSeeOther)
}

View File

@ -0,0 +1,142 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package dataset
import (
"fmt"
// "log"
"strings"
def "Toolbox/defaults"
con "Toolbox/goDataverse/connect"
tol "Toolbox/goDataverse/tools"
gjs "github.com/tidwall/gjson"
)
func GetDatasetLastVersion(_dp tol.TDVParams, _id string) (string, error) {
var imajor int64 = 1
var iminor int64 = 0
var state string = "draft"
var url string = tol.GetSiteUrl(_dp) + "/api/datasets/" + _id + "/versions"
res, err := con.GetRequest(url, tol.ColMap{},
tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
if err == nil {
var ver = tol.GetObjectFromStr(fmt.Sprintf("%s", res))
if ver.IsObject() {
status := gjs.Get(ver.String(), "status")
if status.String() == "OK" {
lst := gjs.Get(ver.String(), "data")
if lst.IsArray() {
for _, entry := range lst.Array() {
if entry.IsObject() {
tmpstate := gjs.Get(entry.String(), "versionState")
switch tmpstate.String() {
case "DRAFT":
break
case "RELEASED":
tmpmajor := gjs.Get(entry.String(), "versionNumber")
if tmpmajor.Int() > imajor {
imajor = tmpmajor.Int()
iminor = gjs.Get(entry.String(), "versionMinorNumber").Int()
} else {
if tmpmajor.Int() == imajor {
tmpminor := gjs.Get(entry.String(), "versionMinorNumber")
if tmpminor.Int() > iminor {
iminor = tmpminor.Int()
}
}
}
state = tmpstate.String()
break
//fmt.Println("GetDatasetLastVersion():", _id, imajor, iminor, state, gjs.Get(entry.String(), "id"))
}
}
}
}
}
}
}
// auswertung: falls keine "released" version vorhanden, dann draft zurück
var version string = ":" + state
switch state {
case "RELEASED":
version = fmt.Sprintf("%v.%v", imajor, iminor)
}
//
return version, err
}
func GetDatasetByPersistentId(_dp tol.TDVParams, _persist, _version string) (string, error) {
var persist string = _persist
var version string = _version
if len(persist) == 0 {
persist = _dp.DP_datasetPid
}
var url string = tol.GetSiteUrl(_dp) + "/api/datasets/:persistentId/%versions%?persistentId=" + persist
if len(version) > 0 {
version = "versions/" + version + "/"
} else {
if len(_dp.DP_datasetVersion) > 0 {
version = "versions/" + _dp.DP_datasetVersion + "/"
}
}
url = strings.Replace(url, "%versions%", version, -1)
def.LogMessage("GetDatasetByPersistentId(url)", url, def.DEF_logdebg)
res, err := con.GetRequest(url, tol.ColMap{},
tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func GetDatasetMetadata(_dp tol.TDVParams, _id, _version string) (string, error) {
var version string = _version
var url string = tol.GetSiteUrl(_dp) + "/api/datasets/" + _id + "/%versions%/metadata"
if len(version) > 0 {
version = "versions/" + version
} else {
if len(_dp.DP_datasetVersion) > 0 {
version = "versions/" + _dp.DP_datasetVersion
} else {
version = "versions/1.0"
}
}
url = strings.Replace(url, "%versions%", version, -1)
def.LogMessage("GetDatasetMetadata(url)", url, def.DEF_logdebg)
res, err := con.GetRequest(url, tol.ColMap{},
tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func GetDatasetMetafield(_dp tol.TDVParams, _id string) (string, error) {
var url string = tol.GetSiteUrl(_dp) + "/api/admin/datasetfield/" + _id
def.LogMessage("GetDatasetMetafield(url)", url, def.DEF_logdebg)
res, err := con.GetRequest(url, tol.ColMap{},
tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func CreateDataset(_dp tol.TDVParams, _parent, _params string) (string, error) {
res, err := con.PostRequestB(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_parent+"/datasets",
[]byte(_params), tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
//
func DownloadByDataset(_dp tol.TDVParams) ([]byte, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/access/dataset/:persistentId/?persistentId="+_dp.DP_datasetPid,
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return res, err
}

View File

@ -0,0 +1,80 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package dataverse
import (
"fmt"
//
con "Toolbox/goDataverse/connect"
tol "Toolbox/goDataverse/tools"
)
func ListDataverses(_dp tol.TDVParams) (string, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/search?q=*&types=dataverse&per_page=1000",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func ListDataverses2(server_url, api_token string) string {
response, _ := con.GetRequest(server_url+"/api/search?q=*&types=dataverse&per_page=1000",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": api_token})
//
return (fmt.Sprintf("%s", response))
}
func GetContentByAlias(_dp tol.TDVParams, _alias string) (string, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_alias+"/contents",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func GetDataverseByIdOrAlias(_dp tol.TDVParams, _id string) (string, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_id,
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func GetDataverseByIdOrAlias2(server_url, api_token, id string) string {
response, _ := con.GetRequest(server_url+"/api/dataverses/"+id, map[string]string{}, map[string]string{"X-Dataverse-key": api_token})
//
return (fmt.Sprintf("%s", response))
}
func GetDataverseStoragesizeById(_dp tol.TDVParams, _id string) (string, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_id+"/storagesize",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func IsDataverseRoot(_dp tol.TDVParams, _alias string) (string, error) {
res, err := con.GetRequest(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_alias+"/metadatablocks/isRoot",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func CreateDataverse(_dp tol.TDVParams, _parent, _params string) (string, error) {
res, err := con.PostRequestB(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_parent,
[]byte(_params), tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}
func DeleteDataverseById(_dp tol.TDVParams, _id string) (string, error) {
res, err := con.DeleteRequest(tol.GetSiteUrl(_dp)+"/api/dataverses/"+_id,
tol.ColMap{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}

View File

@ -0,0 +1,48 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package files
import (
con "Toolbox/goDataverse/connect"
tol "Toolbox/goDataverse/tools"
"errors"
"fmt"
"strings"
gjs "github.com/tidwall/gjson"
)
func GetFilesByDatasetId(_dp tol.TDVParams, _datasetid, _version string,
_citation gjs.Result) (string, error) {
if len(_datasetid) == 0 {
return "", errors.New("No datasetId found.")
}
var datasetid string = _datasetid
var version string = _version
var url string = tol.GetSiteUrl(_dp) + "/api/datasets/" + datasetid + "/%versions%/files"
if len(version) > 0 {
version = "versions/" + version
} else {
if len(_dp.DP_datasetVersion) > 0 {
version = "versions/" + _dp.DP_datasetVersion
} else {
version = "versions/:latest"
}
}
url = strings.Replace(url, "%versions%", version, -1)
//fmt.Println("URL-files:", url)
res, err := con.GetRequest(url, map[string]string{},
map[string]string{"X-Dataverse-key": tol.GetApiKey(_dp)})
//
return (fmt.Sprintf("%s", res)), err
}

Binary file not shown.

1807
goDataverse/goDataverse.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package search
import (
"fmt"
"strings"
//
def "Toolbox/defaults"
con "Toolbox/goDataverse/connect"
tol "Toolbox/goDataverse/tools"
)
// #############################################################################
//
// der parameter "_q_=xxx" wird vor der abfrage in "q=xxx" umgewandelt. hierbei
// handelt es sich um einen workaround, der garantiert, dass die
// parameterreihenfolge bei der übergabe an die abfrage passt.
// aus diesem grund werden hier auch 2 durchläufe benötigt...
//
func SearchByParams(_dvp tol.TDVParams, _params tol.ColMapInt) (string, error) {
var par tol.ColMapInt = make(tol.ColMapInt, 0)
var url string = tol.GetSiteUrl(_dvp) + "/api/search?"
// 1. durchlauf query parameter anhängen
for _, ival := range _params {
// log.Println("SearchByParams(param1):", ival)
for key, val := range ival {
if key == "_q_" {
url = url + key + "=" + val
break
}
}
}
// 2. durchlauf restliche parameter anhängen
for _, ival := range _params {
// log.Println("SearchByParams(param2):", ival)
for key, val := range ival {
if key != "_q_" {
if key != "search" {
url = url + "&" + key + "=" + val
}
}
}
}
// def.LogMessage("", fmt.Sprintf("GetSearchResult(%v) > url: %v", "params", url), def.DEF_loginfo)
fmt.Printf("GetSearchResult(%v) > url: %v\n", "params", url)
response, err := con.GetRequestMap(url, par,
map[string]string{"X-Dataverse-key": tol.GetApiKey(_dvp)})
//
return (fmt.Sprintf("%s", response)), err
}
func SearchSimple(_dvp tol.TDVParams, _alias string, _type string, _advanced string) (string, error) {
var par tol.ColMapInt = make(tol.ColMapInt, 0)
var url string = tol.GetSiteUrl(_dvp) + "/api/search?q=*%type%%alias%&per_page=1000%advanced%"
//
url = strings.ReplaceAll(url, "%alias%", _alias)
url = strings.ReplaceAll(url, "%type%", _type)
url = strings.ReplaceAll(url, "%advanced%", _advanced)
//
def.LogMessage("", fmt.Sprintf("GetSearchResult(%v) > url: %v", "params", url), def.DEF_logdebg)
// log.Printf("GetSearchSimple(%v) > url: %v\n", "params", url)
response, err := con.GetRequestMap(url, par,
map[string]string{"X-Dataverse-key": tol.GetApiKey(_dvp)})
//
return (fmt.Sprintf("%s", response)), err
}

281
goDataverse/svg/svg.go Normal file

File diff suppressed because one or more lines are too long

641
goDataverse/tools/tools.go Normal file
View File

@ -0,0 +1,641 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package tools
import (
"encoding/json"
"log"
"errors"
// "fmt"
"html"
"net/http"
"reflect"
"regexp"
"strings"
"time"
def "Toolbox/defaults"
pog "Toolbox/postgres"
sql "database/sql"
gjs "github.com/tidwall/gjson"
)
type TJson []map[string]interface{}
type TDVParams struct {
DP_datasetId string //
DP_datasetPid string //
DP_datasetVersion string //
DP_localeCode string //
DP_fileId string //
DP_filePid string //
DP_apiKey string //
DP_siteUrl string //
DP_alias string //
DP_routeUrl string //
}
type TFVParams struct {
FP_suid string // generierte suid (js)
FP_type string // 'json', 'html'..
FP_info string // optionale info (bsp.: 'read json grid')
FP_func string // 'getHtml', 'getValues'..
FP_modl string // 'app.active_module' (js)
FP_what string // 'menu', 'datagrid', 'propgrid', 'login'..
FP_suff string // 'login'
FP_extn string // '.txt'. '.json'..
FP_from string // 'db', 'file', 'dataverse'..
FP_user string //
FP_proj string // 'projektname aus tabelle'
FP_who string // art der daten - 'user', 'data'...
FP_time string // übergabe zeitpunkt.
FP_alias string // alias für dataverse grid
FP_dois string // liste der "dois" für sicherung
FP_rout string // umleitung beim ausloggen
FP_refr bool // refresh der session möglich
// für svg
FP_shad string // svg-schatten
FP_widt string // svg-breite
FP_heit string // svg-höhe
FP_matx string // svg-transfor.matrix
FP_view string // svg-viewbox
//
FP_qery string // abfrage-string
//
FP_parm ColMapInt
}
type TFileColumns struct {
FC_sequence string
FC_field string
FC_title string
FC_isvisible bool
}
type TValueRow struct {
VR_key string
VR_value string
}
type TUserEntry struct {
UE_Done bool
UE_IpAddress string
UE_IpPort string
UE_IdleTime time.Time
UE_Released time.Time
UE_DVParams TDVParams
UE_FVParams TFVParams
UE_DBConn *sql.DB
UE_Datasets string
}
type SVGMap map[string]string
type ColMap map[string]string
type JsnColMap map[string]interface{}
type ColMapInt map[int]map[string]string
type RowMap map[string]map[string]string
type JsnMapInt map[int]map[string]interface{}
type TUserEntries map[string]TUserEntry
type TDatasetEntries map[string]string
type TDataverse JsnColMap
// dataverse
var Dp TDVParams
var Fp TFVParams
var Ue TUserEntries
var Ds TDatasetEntries
var icnt int = 0
var Col = ""
var Val = ""
var Source string = "head;menu;grid;propgrid;content;login;"
//
var DataColList ColMap = make(ColMap, 0)
var FileColList ColMap = make(ColMap, 0)
func CheckConnection(_fparam TFVParams) (*sql.DB, error) {
var err error = errors.New("SUID not found.")
if len(_fparam.FP_suid) > 0 {
var ok bool = false
var ue TUserEntry
//
ue, ok = Ue[_fparam.FP_suid]
if ok {
// fmt.Println("CheckConnection(entry):", _fparam.FP_suid, ue.UE_DBConn)
if ue.UE_DBConn == nil {
ue.UE_DBConn, err = pog.GetConnection()
if err == nil {
//fmt.Println("CheckConnection(created 1):", _fparam.FP_suid, ue.UE_DBConn)
Ue[_fparam.FP_suid] = ue
return ue.UE_DBConn, nil
}
} else {
return ue.UE_DBConn, nil
}
}
}
//
return nil, err
}
func CloseConnection(_fparam TFVParams) error {
// var err error = errors.New("SUID not found.")
var ue TUserEntry = Ue[_fparam.FP_suid]
pog.CloseConnection(ue.UE_DBConn)
//
return nil
}
func RemoveLBR(text string, repl string) string {
re := regexp.MustCompile(`\x{000D}\x{000A}|[\x{000A}\x{000B}\x{000C}\x{000D}\x{0085}\x{2028}\x{2029}]`)
return re.ReplaceAllString(text, repl)
}
func PrintMap(_map map[string][]string) {
for key, value := range _map {
for fkey, fvalue := range value {
log.Println(key, " has ", fkey, ":", fvalue)
}
}
}
func GetIP(_r *http.Request) string {
forwarded := _r.Header.Get("X-FORWARDED-FOR")
if forwarded != "" {
return forwarded
}
return _r.RemoteAddr
}
func GetApiKey(_dp TDVParams) string {
var apikey string = def.DEF_apikey
if len(_dp.DP_apiKey) > 0 {
apikey = _dp.DP_apiKey
}
//
return apikey
}
func GetSiteUrl(_dp TDVParams) string {
var siteurl string = def.DEF_siteurl
if len(_dp.DP_siteUrl) > 0 {
siteurl = _dp.DP_siteUrl
}
//
return siteurl
}
func GetRouteUrl(_dp TDVParams) string {
var siteurl string = def.DEF_routeurl
if len(_dp.DP_routeUrl) > 0 {
siteurl = _dp.DP_routeUrl
}
//
return siteurl
}
// get string between (tools)
func GetstringBetween(_string string, _start string, _end string) string {
var str = "" + _string
var s = strings.Index(str, _start)
if s == -1 {
return ""
}
s += len(_start)
e := strings.Index(str, _end)
if e == -1 {
return ""
}
return str[s:e]
}
func AddStrings(_sum, _val string, _sep string) string {
if len(_sum) > 0 {
return _sum + _sep + _val
}
return _val
}
func UniqueStrings(_str, _sep string) string {
m := make(map[string]bool)
keys := make([]string, 0)
for _, c := range strings.Split(_str, _sep) {
if _, ok := m[c]; !ok {
m[c] = true
keys = append(keys, c)
}
}
//
return strings.Join(keys, _sep)
}
func JsonEscape(i string) string {
b, err := json.Marshal(i)
if err != nil {
def.LogError("JsonEscape()", err)
panic(err)
}
s := string(b)
//
return s[1 : len(s)-1]
}
func GetTabLevel(_level int64) string {
var tab string = ""
for i := 0; i < int(_level); i++ {
tab = tab + "\t"
}
//
return tab
}
func GetTab10(_level int) (string, string) {
var taba string = "\t"
var tabb string = "\t\t"
var level int = _level
for {
if level < 10 {
break
}
taba = taba + "\t"
tabb = tabb + "\t"
level = level / 10
}
//
return taba, tabb
}
func GetJsonResult(_base gjs.Result, _key string) gjs.Result {
return gjs.Get(_base.String(), _key)
}
func GetJsonString(_base gjs.Result, _key string) string {
return GetJsonResult(_base, _key).String()
}
func GetJsonInt(_base gjs.Result, _key string) int64 {
return GetJsonResult(_base, _key).Int()
}
func GetObjectFromStr(_objstr string) gjs.Result {
var resobj gjs.Result = gjs.Get(`{"data":`+_objstr+`}`, "data")
//
return resobj
}
func DoFilterByJsonStr(_objstr gjs.Result) gjs.Result {
if _objstr.Type == gjs.String {
_objstr = GetObjectFromStr(string(`"` + DoFilterByStr(_objstr.String()) + `"`))
}
//
return _objstr
}
func DoFilterByStr(_str string) string {
var svalue string = strings.ReplaceAll(_str, "\n", " ")
if reflect.TypeOf(_str).Name() == "string" {
if strings.Contains(_str, `"`) {
evalarr := strings.Split(_str, `"`)
if len(evalarr) > 0 {
smarshall, err := json.Marshal(_str)
if err != nil {
svalue = "Wrong count of double quoted sign."
} else {
svalue = strings.Trim(string(smarshall), `"`)
}
} else {
svalue = html.EscapeString(svalue)
// svalue = strings.ReplaceAll(svalue, `"`, "&quot;")
}
}
}
svalue = strings.ReplaceAll(svalue, "\t", "&#9;")
//
return svalue
}
func JsonSearch(_json gjs.Result, _key, _value string, _level int64, _caption gjs.Result) (gjs.Result, bool) {
if _level == 0 {
_caption.Type = gjs.Null
} else {
if _caption.Type != gjs.Null {
_caption = DoFilterByJsonStr(_caption)
//
return _caption, true
}
}
var result bool = false
if _json.IsObject() {
var keysearch bool = (len(_key) > 0)
_json.ForEach(func(jkey, jvalue gjs.Result) bool {
if jvalue.IsArray() {
_caption, result = JsonSearch(jvalue, _key, _value, _level+1, _caption)
// fmt.Println(GetTabLevel(_level), "(oa)", jkey, "=", _caption)
} else {
if jvalue.IsObject() {
_caption, result = JsonSearch(jvalue, _key, _value, _level+1, _caption)
// fmt.Println(GetTabLevel(_level), "(oo)", jkey, "=", _caption)
} else {
// fmt.Println(GetTabLevel(_level), "(ov)", _key, _value, jkey, "=", jvalue)
if keysearch {
if jkey.String() == _key {
if jvalue.String() == _value {
_caption = gjs.Get(_json.String(), "value")
result = (_caption.Type != gjs.Null)
// fmt.Println(GetTabLevel(_level), "(< [", _level, "] ov >)", _key, ".", _value, "=", _caption, _value)
}
}
} else {
if jkey.String() == _value {
_caption = jvalue
result = (_caption.Type != gjs.Null)
// fmt.Println(GetTabLevel(_level), "(< [", _level, "] ov >)", _key, ".", _value, "=", _caption, _value)
}
}
}
}
if _caption.Type != gjs.Null {
return false
}
return true
})
} else {
if _json.IsArray() {
for jkey, jvalue := range _json.Array() {
jkey = jkey
if jvalue.IsArray() {
// log.Println(GetTabLevel(_level), "(aa)", jkey, "=")
_caption, result = JsonSearch(jvalue, _key, _value, _level+1, _caption)
} else {
if jvalue.IsObject() {
// log.Println(GetTabLevel(_level), "(ao)", jkey, "=")
_caption, result = JsonSearch(jvalue, _key, _value, _level+1, _caption)
} else {
// log.Println(GetTabLevel(_level), "(av)", jkey, "=", jvalue)
if jvalue.String() == _value {
_caption = gjs.Get(_json.String(), "value")
// log.Println(GetTabLevel(_level), "(< [", _level, "] av >)", _key, ".", _value, "=", _caption, _value)
break
}
}
}
}
}
}
if _caption.Type != gjs.Null {
_caption = DoFilterByJsonStr(_caption)
}
//
// fmt.Println(GetTabLevel(_level), "(res)", _key, _value, "=", _caption)
return _caption, result
}
func AddValues(_col, _val string, _caption, _value gjs.Result) (string, string) {
_col = AddStrings(_col, `"`+_caption.String(), `",`)
_val = AddStrings(_val, `"`+_caption.String()+`":"`+DoFilterByStr(_value.String())+`",`, `,`)
//
return _col, _val
}
func AddColumnToMap(_col ColMap, _key, _value gjs.Result) ColMap {
if len(_key.String()) > 0 {
if _value.IsObject() {
return _col
}
if len(_col) == 0 {
_col = make(ColMap)
}
_value = DoFilterByJsonStr(_value)
_col[`"`+_key.String()+`"`] = `"` + _value.String() + `"`
}
//
return _col
}
func AddColumnToMapAsString(_col ColMap, _key, _value string) ColMap {
if len(_key) > 0 {
if len(_col) == 0 {
_col = make(ColMap)
}
// _col[_key] = _value
_value = DoFilterByStr(_value)
_col[`"`+_key+`"`] = `"` + _value + `"`
}
//
return _col
}
func AddValueToMap(_row RowMap, _col ColMap,
_index, _key, _value gjs.Result, _exclude, _include string) (RowMap, ColMap) {
if len(_key.String()) > 0 {
if _value.IsObject() {
// log.Println("object:", _key, ",", _value)
_value.ForEach(func(fkey, fvalue gjs.Result) bool {
if fkey.String() == "typeName" {
var typevalue gjs.Result
typevalue, _ = JsonSearch(_value, "", "value", 0, typevalue)
// log.Println("type(1):", fvalue, ",", typevalue)
if typevalue.IsObject() || typevalue.IsArray() {
return true
}
_row, _col = AddValueToMap(_row, _col, _index, fvalue, typevalue, _exclude, _include)
return false
}
// log.Println("type(2):", fkey, ",", fvalue)
_row, _col = AddValueToMap(_row, _col, _index, fkey, fvalue, _exclude, _include)
return true
})
return _row, _col
} else {
if _value.IsArray() {
for _, avalue := range _value.Array() {
// log.Println("array(3):", _key, ",", avalue)
_row, _col = AddValueToMap(_row, _col, _index, _key, avalue, _exclude, _include)
}
return _row, _col
} else {
var typevalue gjs.Result = DoFilterByJsonStr(_value)
// fmt.Println("AddValueToMap()", _key, ":", typevalue)
if len(_row) == 0 {
_row = make(RowMap)
}
if len(_row[`"`+_index.String()+`"`]) == 0 {
_row[`"`+_index.String()+`"`] = make(ColMap)
}
_row[`"`+_index.String()+`"`][`"`+_key.String()+`"`] = `"` + typevalue.String() + `"`
_col = AddColumnToMap(_col, _key, _key)
}
}
}
//
return _row, _col
}
func JsonSearchSet(_json gjs.Result, _key, _val string, _level int64, _caption, _value gjs.Result) (gjs.Result, gjs.Result, bool) {
if _level == 0 {
_value.Type = gjs.Null
} else {
if _value.Type != gjs.Null {
return _caption, _value, true
}
}
var result bool = false
if _json.IsObject() {
_json.ForEach(func(jkey, jvalue gjs.Result) bool {
// log.Println(GetTabLevel(_level), "(oo)", _key, _val, jkey, jvalue)
if jvalue.IsArray() {
// log.Println(GetTabLevel(_level), "(oa)", _key, _val, jkey, "=", jvalue, _caption, _value)
_caption, _value, result = JsonSearchSet(jvalue, _key, _val, _level+1, _caption, _value)
} else {
if jvalue.IsObject() {
var oocaption gjs.Result
var oovalue gjs.Result
_caption, _value, result = JsonSearchSet(jvalue, _key, _val, _level+1, oocaption, oovalue)
if result {
// log.Println(GetTabLevel(_level), "(ooo)", jkey, "=", jvalue, _caption, _value)
icnt = icnt + 1
Col, Val = AddValues(Col, Val, _caption, _value)
return false
}
// log.Println(GetTabLevel(_level), "(oo)", jkey, "=", jvalue, _caption, _value)
} else {
// log.Println(GetTabLevel(_level), "(ov)", _key, _val, jkey, "=", jvalue)
if jkey.String() == _key {
_caption = gjs.Get(_json.String(), _key)
return true
}
if jkey.String() == _val {
// log.Println(GetTabLevel(_level), "(< [", _level, "] ov >)", _key, ".", _val, "=", _caption, ".", _value)
_value = gjs.Get(_json.String(), _val)
icnt = icnt + 1
Col, Val = AddValues(Col, Val, _caption, _value)
return false
}
}
}
// log.Println(GetTabLevel(_level), "(< [", _level, "] ov >)", _key, ".", _val, "=", _caption, ".", _value)
if _value.Type != gjs.Null {
return false
}
return true
})
if _value.Type != gjs.Null {
// log.Println("JsonSearchSet(fo):", _level, _caption, _value)
return _caption, _value, true
}
} else {
if _json.IsArray() {
for _, jvalue := range _json.Array() {
// log.Println(GetTabLevel(_level), "(aa)", _key, _val, jkey, "=", jvalue, _caption, _value)
if jvalue.IsArray() {
// log.Println(GetTabLevel(_level), "(aa)", jkey, "=")
_caption, _value, result = JsonSearchSet(jvalue, _key, _val, _level+1, _caption, _value)
if result {
// log.Println(GetTabLevel(_level), "(ooo)", jkey, "=", jvalue, _caption, _value)
icnt = icnt + 1
Col, Val = AddValues(Col, Val, _caption, _value)
}
} else {
if jvalue.IsObject() {
jvalue.ForEach(func(jjkey, jjvalue gjs.Result) bool {
// log.Println(GetTabLevel(_level), "(ooo)", jjkey, jjvalue)
if jjvalue.IsObject() {
var oocaption gjs.Result
var oovalue gjs.Result
oocaption, oovalue, result = JsonSearchSet(jjvalue, _key, _val, _level+1, oocaption, oovalue)
if result {
if oovalue.Type != gjs.Null {
icnt = icnt + 1
Col, Val = AddValues(Col, Val, _caption, _value)
}
}
}
return true
})
} else {
// log.Println(GetTabLevel(_level), "(av)", jkey, "=", jvalue)
if jvalue.String() == _val {
_value = gjs.Get(_json.String(), "value")
icnt = icnt + 1
Col, Val = AddValues(Col, Val, _caption, _value)
}
}
}
if _value.Type != gjs.Null {
// log.Println("JsonSearchSet(fa):", _level, _caption, _value)
return _caption, _value, true
}
}
}
}
// log.Println("JsonSearchSet(end):", _level, _caption, _value)
return _caption, _value, result
}
func CreateLogin(r *http.Request) string {
_prefix := r.FormValue("pref")
_middle := r.FormValue("midl")
_suffix := r.FormValue("suff")
//
var html []string
html = append(html, "<div id=\""+_prefix+_middle+_suffix+"\" class = \"easyui-panel\" style=\"width:400px;\" data-options=\"")
// panel
html = append(html, " footer:'#"+_prefix+_middle+_suffix+"_footer'")
// window
html = append(html, ",modal:true")
html = append(html, ",resizable:true")
html = append(html, ",minimizable:false")
html = append(html, ",maximizable:false")
html = append(html, ",collapsible:false")
html = append(html, ",cache:false")
html = append(html, ",draggable:true")
html = append(html, ",title:''")
html = append(html, "\">")
html = append(html, "<div style=\"height:15px;\">&nbsp;</div>")
html = append(html, "<table cellpadding=\"5\" style=\"width:100%;\">")
html = append(html, "<tbody>")
html = append(html, "<tr>")
html = append(html, "<td text=\"L_logon_user\" width=\"30%\" style=\"margin-top:10px;\">Anmeldename:</td>")
html = append(html, "<td style=\"margin-top:10px;\">")
html = append(html, "<input class=\"easyui-textbox\" id=\"login_frm_user\" name=\"login_frm_user\" value=\"\" autocomplete=\"off\" data-options=\"iconCls:'icon-lock'\" style=\"width:95%\">")
html = append(html, "</tr>")
html = append(html, "<tr>")
html = append(html, "<td text=\"L_logon_pwd\" width=\"30%\">Passwort:</td>")
html = append(html, "<td>")
html = append(html, "<input class=\"easyui-textbox\" type=\"password\" id=\"login_frm_pwd\" name=\"login_frm_pwd\" value=\"\" autocomplete=\"off\" data-options=\"iconCls:'icon-lock'\" style=\"width:95%\">")
html = append(html, "</td>")
html = append(html, "</tr>")
html = append(html, "<tr>")
html = append(html, "<td colspan=\"1\" style=\"text-align:left; padding-top:10px;\" width=\"\">")
html = append(html, "<a>&nbsp;</a>")
html = append(html, "</td>")
html = append(html, "<td colspan=\"1\" align=\"left\" style=\"padding-top:10px;padding-bottom:10px;\">")
html = append(html, "<a text=\"AC_host_logon\" id=\"btn_login_frm\" href=\"#\" class=\"easyui-linkbutton\" onclick=\"setLogin();\" style=\"padding:4px 40px 4px 40px;\" group=\"\">")
html = append(html, "Anmelden</a>")
html = append(html, "</td>")
html = append(html, "</tr>")
html = append(html, "</tbody>")
html = append(html, "</table>")
html = append(html, "</div>")
html = append(html, "<div id=\""+_prefix+_middle+_suffix+"_footer\" style=\"padding:3px; font-size:75%; text-align:right;\">")
html = append(html, "<div id=\""+_prefix+_middle+_suffix+"_copyright\" style=\"padding:2px; font-size:75%; text-align:center;\">Copyright &copy; 2010 <a href=\"http://www.archium.org\" target=\"_blank\">archium GmbH</a></div>")
html = append(html, "</div>")
//
// log.Println("HTML:", strings.Join(html, ""))
return strings.Join(html, "")
}

134
goDataverse/user/user.go Normal file
View File

@ -0,0 +1,134 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package user
import (
"errors"
"fmt"
"strings"
// "log"
// "reflect"
"Toolbox/goDataverse/connect"
tol "Toolbox/goDataverse/tools"
gjs "github.com/tidwall/gjson"
// "log"
)
func ListUsers(_serverurl, _apitoken string, _sorted bool) (string, error) {
response, err := connect.GetRequest(_serverurl+"/api/admin/list-users"+
func(s bool) string {
if s {
return "?sortKey=createdtime"
} else {
return ""
}
}(_sorted), tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
return (fmt.Sprintf("%s", response)), err
}
func ListUser(_serverurl, _apitoken, _id string) (string, error) {
response, err := connect.GetRequest(_serverurl+"/api/admin/authenticatedUsers/"+_id,
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
return (fmt.Sprintf("%s", response)), err
}
func IsValidUser(_serverurl, _apitoken string) (bool, bool, string, error) {
var ident string = ""
var super bool = false
var valid bool = false
//
response, err := connect.GetRequest(_serverurl+"/api/users/:me",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
message := tol.GetObjectFromStr("")
me := fmt.Sprintf("%v", string(response))
status := gjs.Get(me, "status")
if status.String() == "OK" {
data := gjs.Get(me, "data")
if data.IsObject() {
ident = strings.ReplaceAll(gjs.Get(data.String(), "identifier").String(), "@", "")
super = gjs.Get(data.String(), "superuser").Bool()
valid = true
}
} else {
if status.String() == "ERROR" {
message = gjs.Get(me, "message")
err = errors.New(message.String())
}
}
// log.Println("IsValidUser:", message.String(), valid, super, ident, me)
//
return valid, super, ident, err
}
func IsSuperUser(_serverurl, _apitoken string) (bool, error) {
var super bool = false
//
response, err := connect.GetRequest(_serverurl+"/api/users/:me",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
me := fmt.Sprintf("%s", response)
status := gjs.Get(me, "status")
if status.String() == "OK" {
data := gjs.Get(me, "data")
if data.IsObject() {
super = gjs.Get("superuser", data.String()).Bool()
}
} else {
if status.String() == "ERROR" {
message := gjs.Get(me, "message")
err = errors.New(message.String())
}
}
//
return super, err
}
func ToggleSuperUser(_serverurl, _apitoken, _id string) (string, error) {
response, err := connect.PostRequest(_serverurl+"/api/admin/superuser/"+_id+"",
tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
return (fmt.Sprintf("%s", response)), err
}
func SearchData(_serverurl, _apitoken string, _sorted bool) (string, error) {
response, err := connect.GetRequest(_serverurl+"/api/search?q=*"+
func(s bool) string {
if s {
return "?sortKey=createdtime"
} else {
return ""
}
}(_sorted), tol.ColMap{}, tol.ColMap{"X-Dataverse-key": _apitoken})
//
return (fmt.Sprintf("%s", response)), err
//
// curl -H "X-Dataverse-key:$API_TOKEN" $SERVER_URL/api/admin/list-users
// # sort it by createdtime (the creation time of the account)
// # curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/list-users?sortKey=createdtime"
}
/*
func CreateAuthenticatedUser(server_url, api_token, params string) string {
response, err := connect.PostRequestB(server_url+"/api/admin/authenticatedUsers", []byte(params), tol.ColMap{"X-Dataverse-key": api_token})
if err != nil {
log.Fatal(err)
}
return (fmt.Sprintf("%s", response))
}
*/

View File

@ -0,0 +1,173 @@
package connect
import (
"bytes"
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
func GetRequest(url string, params, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
req, _ := http.NewRequest("GET", url, nil)
for k, v := range header {
req.Header.Add(k, v)
}
query := req.URL.Query()
for k, v := range params {
query.Add(k, v)
}
req.URL.RawQuery = query.Encode()
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
//def.LogMessage("GetRequest(req.URL.String())", req.URL.String(), def.DEF_logdebg)
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
//def.LogMessage("GetRequest(req.URL.String())", req.URL.String(), def.DEF_logdebg)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}
func PostRequest(url string, params, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
postData, err := json.Marshal(params)
//fmt.Println(postData)
req, _ := http.NewRequest("POST", url, bytes.NewReader(postData))
if err != nil {
log.Fatal(err)
}
for k, v := range header {
req.Header.Add(k, v)
}
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}
func PostRequestB(url string, postData []byte, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
req, err := http.NewRequest("POST", url, bytes.NewReader(postData))
if err != nil {
log.Fatal(err)
}
for k, v := range header {
req.Header.Add(k, v)
}
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}
func PutRequest(url, body string, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
req, _ := http.NewRequest("PUT", url, bytes.NewReader([]byte(body)))
if err != nil {
log.Fatal(err)
}
for k, v := range header {
req.Header.Add(k, v)
}
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}
func PutRequestB(url string, body []byte, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
req, err := http.NewRequest("PUT", url, bytes.NewReader(body))
if err != nil {
log.Fatal(err)
}
for k, v := range header {
req.Header.Add(k, v)
}
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}
func DeleteRequest(url string, header map[string]string) (b []byte, err error, debug string) {
client := &http.Client{}
req, _ := http.NewRequest("DELETE", url, nil)
for k, v := range header {
req.Header.Add(k, v)
}
//DEBUG
//fmt.Println(req.URL.String())
debug = req.URL.String()
res, _ := client.Do(req)
//DEBUG
//fmt.Println(res.Request.Header)
b, err = ioutil.ReadAll(res.Body)
res.Body.Close()
return
}

View File

@ -0,0 +1,656 @@
package metrics
import (
"Toolbox/goDataverseStrict/connect"
"encoding/json"
"log"
"sort"
"strconv"
"strings"
"time"
"golang.org/x/exp/slices"
)
type (
MetricsType string // To ensure, that the set of constants is limited (a kind of enumeration)
MetricsDataCountType string
ReturnformatType string
SearchType string
)
const PDPURL = "https://pdp.archium.org"
// const IDRequestCriteriaPrefix = "input_"
const (
IDRequestCriteriaPrefix = "get_input_"
IDRequestTextPrefix = "text_input_"
IDRequestHideDisplayPrefix = "span_input_"
IDFormSubmit = "input_form_submit"
)
const StaticMetricsAPIbody = "/api/info/metrics/"
const (
//Level0
MT0unset MetricsType = "" //TODO: Platzhalter für unbelegt, eventuell unnötig
MT1dataverses MetricsType = "dataverses"
MT2datasets MetricsType = "datasets"
MT3files MetricsType = "files"
MT4downloads MetricsType = "downloads"
MT5filedownloads MetricsType = "filedownloads"
MT6uniquefiledownloads MetricsType = "uniquefiledownloads"
MT7makeDataCount MetricsType = "makeDataCount"
//Level1
MDCT0unset MetricsDataCountType = "" //TODO: Platzhalter für unbelegt, eventuell unnötig
MDCT1viewsTotal MetricsDataCountType = "viewsTotal"
MDCT2viewsTotalRegular MetricsDataCountType = "viewsTotalRegular"
MDCT3viewsTotalMachine MetricsDataCountType = "viewsTotalMachine"
MDCT4viewsUnique MetricsDataCountType = "viewsUnique"
MDCT5viewsUniqueRegular MetricsDataCountType = "viewsUniqueRegular"
MDCT6viewsUniqueMachine MetricsDataCountType = "viewsUniqueMachine"
MDCT7downloadsTotal MetricsDataCountType = "downloadsTotal"
MDCT8downloadsTotalRegular MetricsDataCountType = "downloadsTotalRegular"
MDCT9downloadsTotalMachine MetricsDataCountType = "downloadsTotalMachine"
MDCT10downloadsUnique MetricsDataCountType = "downloadsUnique"
MDCT11downloadsUniqueRegular MetricsDataCountType = "downloadsUniqueRegular"
MDCT12downloadsUniqueMachine MetricsDataCountType = "downloadsUniqueMachine"
MDCT13citations MetricsDataCountType = "citations"
//Level2
ST0unset SearchType = "" //TODO: Platzhalter für unbelegt, eventuell unnötig
ST1total SearchType = "total" // ISt eigentlich ein Platzhalter. "total" gibt es nicht und wirkt dann, wenn der SearchType weggelassen wird.
ST2tomonth SearchType = "toMonth"
ST3pastdays SearchType = "pastDays"
ST4monthly SearchType = "monthly"
ST5tree SearchType = "tree"
//Level3
RT0unset ReturnformatType = "" //TODO: Platzhalter für unbelegt, eventuell unnötig
RT1json ReturnformatType = "application/json"
RT2csv ReturnformatType = "text/csv"
)
type InputLevel3 = map[ReturnformatType]bool
var OneJumpPointResultformat = map[ReturnformatType]bool{
RT0unset: false,
RT1json: false,
RT2csv: false,
}
type InputLevel2 = map[SearchType]InputLevel3
var OneJumpPointSearchType = InputLevel2{
ST0unset: OneJumpPointResultformat,
ST1total: OneJumpPointResultformat,
ST2tomonth: OneJumpPointResultformat,
ST3pastdays: OneJumpPointResultformat,
ST4monthly: OneJumpPointResultformat,
ST5tree: OneJumpPointResultformat,
}
type InputLevel1 = map[MetricsDataCountType]InputLevel2
var OneJumpPointMetricsDataCountType = InputLevel1{
MDCT0unset: OneJumpPointSearchType,
MDCT1viewsTotal: OneJumpPointSearchType,
MDCT2viewsTotalRegular: OneJumpPointSearchType,
MDCT3viewsTotalMachine: OneJumpPointSearchType,
MDCT4viewsUnique: OneJumpPointSearchType,
MDCT5viewsUniqueRegular: OneJumpPointSearchType,
MDCT6viewsUniqueMachine: OneJumpPointSearchType,
MDCT7downloadsTotal: OneJumpPointSearchType,
MDCT8downloadsTotalRegular: OneJumpPointSearchType,
MDCT9downloadsTotalMachine: OneJumpPointSearchType,
MDCT10downloadsUnique: OneJumpPointSearchType,
MDCT11downloadsUniqueRegular: OneJumpPointSearchType,
MDCT12downloadsUniqueMachine: OneJumpPointSearchType,
MDCT13citations: OneJumpPointSearchType,
}
type InputLevel0 = map[MetricsType]InputLevel1
var OldOneJumpPointSet = InputLevel0{
MT0unset: OneJumpPointMetricsDataCountType,
MT1dataverses: OneJumpPointMetricsDataCountType,
MT2datasets: OneJumpPointMetricsDataCountType,
MT3files: OneJumpPointMetricsDataCountType,
MT4downloads: OneJumpPointMetricsDataCountType,
MT5filedownloads: OneJumpPointMetricsDataCountType,
MT6uniquefiledownloads: OneJumpPointMetricsDataCountType,
MT7makeDataCount: OneJumpPointMetricsDataCountType,
}
type OneJumpPointSet struct {
Level0 MetricsType
Level1 MetricsDataCountType
Level2 SearchType
Level3 ReturnformatType
Active bool
}
var OneJumpPoints []OneJumpPointSet
// Presets
func init() {
//OneJumpPoints = make([]OneJumpPointSet, 910, 910)
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT1dataverses, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT1dataverses, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT1dataverses, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT1dataverses, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT1dataverses, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT2datasets, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT2datasets, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT2datasets, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT2datasets, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT2datasets, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT3files, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT3files, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT3files, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT3files, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT3files, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT4downloads, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT4downloads, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT4downloads, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT4downloads, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT4downloads, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT5filedownloads, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT5filedownloads, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT5filedownloads, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT5filedownloads, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT5filedownloads, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT6uniquefiledownloads, Level1: MDCT0unset, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT6uniquefiledownloads, Level1: MDCT0unset, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT6uniquefiledownloads, Level1: MDCT0unset, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT6uniquefiledownloads, Level1: MDCT0unset, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT6uniquefiledownloads, Level1: MDCT0unset, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST0unset, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT1viewsTotal, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT2viewsTotalRegular, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT2viewsTotalRegular, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT2viewsTotalRegular, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT2viewsTotalRegular, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT2viewsTotalRegular, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT3viewsTotalMachine, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT3viewsTotalMachine, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT3viewsTotalMachine, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT3viewsTotalMachine, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT3viewsTotalMachine, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT4viewsUnique, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT4viewsUnique, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT4viewsUnique, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT4viewsUnique, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT4viewsUnique, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT5viewsUniqueRegular, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT5viewsUniqueRegular, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT5viewsUniqueRegular, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT5viewsUniqueRegular, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT5viewsUniqueRegular, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT6viewsUniqueMachine, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT6viewsUniqueMachine, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT6viewsUniqueMachine, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT6viewsUniqueMachine, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT6viewsUniqueMachine, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT7downloadsTotal, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT7downloadsTotal, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT7downloadsTotal, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT7downloadsTotal, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT7downloadsTotal, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT8downloadsTotalRegular, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT8downloadsTotalRegular, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT8downloadsTotalRegular, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT8downloadsTotalRegular, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT8downloadsTotalRegular, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT9downloadsTotalMachine, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT9downloadsTotalMachine, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT9downloadsTotalMachine, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT9downloadsTotalMachine, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT9downloadsTotalMachine, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT10downloadsUnique, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT10downloadsUnique, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT10downloadsUnique, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT10downloadsUnique, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT10downloadsUnique, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT11downloadsUniqueRegular, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT11downloadsUniqueRegular, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT11downloadsUniqueRegular, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT11downloadsUniqueRegular, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT11downloadsUniqueRegular, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT12downloadsUniqueMachine, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT12downloadsUniqueMachine, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT12downloadsUniqueMachine, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT12downloadsUniqueMachine, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT12downloadsUniqueMachine, Level2: ST5tree, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT13citations, Level2: ST1total, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT13citations, Level2: ST2tomonth, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT13citations, Level2: ST3pastdays, Level3: RT1json, Active: false}) // Nicht valide
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT13citations, Level2: ST4monthly, Level3: RT1json, Active: true})
OneJumpPoints = append(OneJumpPoints, OneJumpPointSet{Level0: MT7makeDataCount, Level1: MDCT13citations, Level2: ST5tree, Level3: RT1json, Active: true})
//OldOneJumpPointSet[MT1dataverses][MDCT1viewsTotal][ST2_tomonth][RT1json] = true
//OldOneJumpPointSet[MT1dataverses][MDCT2viewsTotalRegular][ST3_pastdays][RT2csv] = true
//fmt.Println(OneJumpPointSet)
}
func FilterStacklist(meisleisz []OneJumpPointSet, index int8) (deisleisz []string, activity []bool) {
switch index {
case 0:
for _, v := range meisleisz {
if !slices.Contains(deisleisz, string(v.Level0)) {
deisleisz = append(deisleisz, string(v.Level0))
activity = append(activity, v.Active)
}
}
case 1:
for _, v := range meisleisz {
if !slices.Contains(deisleisz, string(v.Level1)) {
deisleisz = append(deisleisz, string(v.Level1))
activity = append(activity, v.Active)
}
}
case 2:
for _, v := range meisleisz {
if !slices.Contains(deisleisz, string(v.Level2)) {
deisleisz = append(deisleisz, string(v.Level2))
activity = append(activity, v.Active)
}
}
case 3:
for _, v := range meisleisz {
if !slices.Contains(deisleisz, string(v.Level3)) {
deisleisz = append(deisleisz, string(v.Level3))
activity = append(activity, v.Active)
}
}
}
return
}
type RequestComponentsType struct {
Level0MetricsType, Level1MetricsDataCountType, Level2SearchType, Level21UserInput, Level3ReturnformatType string
}
/*
func JsonStructSelector[resulttype MonthlyJsonData | TotalJsonData | TreeJsonData | struct{}](bjson []byte) (result resulttype) {
switch {
case json.Unmarshal(bjson, &result) == nil:
case json.Unmarshal(bjson, &result) == nil:
case json.Unmarshal(bjson, &result) == nil:
}
return
}
*/
/*
func MetricsUniversal(server_url, api_token string, rcs RequestComponentsType) {
var err error
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(rcs.Level3ReturnformatType) > 0 {
header["Accept"] = string(rcs.Level3ReturnformatType)
}
stest := func(s ...string) string {
if (len(s) > 1 && len(s[0]) > 0) || len(s) == 1 {
if s[0] == string(ST1total) {
return ""
} else {
return "/" + s[0]
}
} else if (len(s) == 2 && len(s[1]) > 0) || (len(s) == 3 && len(s[1]) > 0 && len(s[2]) == 0) {
return "/" + s[1]
} else if len(s) == 3 && len(s[1]) > 0 && len(s[2]) > 0 {
if s[0] == string(ST1total) {
return ""
} else if s[1] == string(ST4monthly) {
return "/" + s[1] // bei Monthly werden erstmal ALLE Datensätze gezogen
} else {
return "/" + s[1] + "/" + s[2]
}
} else {
return ""
}
}
log.Println("DEBUG:", server_url+"/api/info/metrics"+
"/"+rcs.Level0MetricsType+
stest(rcs.Level1MetricsDataCountType, rcs.Level2SearchType, rcs.Level21UserInput))
if err != nil {
log.Fatal(err)
}
return
}*/
//func MetricsDataCountType() (response []byte, debug string)
func MetricsTotal(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string) (response []byte, debug string) {
var err error
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(return_format) > 0 {
header["Accept"] = string(return_format)
}
//log.Println(header)
response, err, debug = connect.GetRequest(server_url+StaticMetricsAPIbody+mtypeOrMdctypeCombi, map[string]string{}, header)
if err != nil {
log.Fatal(err)
}
return
}
func MetricsToMonth(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string, timerange time.Time) (response []byte, debug string) {
var err error
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(return_format) > 0 {
header["Accept"] = string(return_format)
}
//log.Println(header)
response, err, debug = connect.GetRequest(server_url+StaticMetricsAPIbody+mtypeOrMdctypeCombi+"/toMonth/"+timerange.Format("2006-01"), map[string]string{}, header)
if err != nil {
log.Fatal(err)
}
return
}
func MetricsPastDays(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string, days int) (response []byte, debug string) {
var err error
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(return_format) > 0 {
header["Accept"] = string(return_format)
}
//log.Println(header)
response, err, debug = connect.GetRequest(server_url+StaticMetricsAPIbody+mtypeOrMdctypeCombi+"/pastDays/"+strconv.Itoa(days), map[string]string{}, header)
if err != nil {
log.Fatal(err)
}
return
}
func MetricsMonthly(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string) (response []byte, debug string) {
var err error
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(return_format) > 0 {
header["Accept"] = string(return_format)
}
//log.Println(header)
response, err, debug = connect.GetRequest(server_url+StaticMetricsAPIbody+mtypeOrMdctypeCombi+"/monthly/", map[string]string{}, header)
if err != nil {
log.Fatal(err)
}
return
}
type MonthlyJsonData struct {
Status string `json:"status"`
Data []struct {
Date string `json:"date"`
Id int `json:"id"`
Pid string `json:"pid"`
Counttotal int `json:"count"`
Countmonth int `json:"mount"` //Month Count
//Intex int `json:"intex"` //Integer Index instead of Date
DoiDoi string `json:"doidoi"` //Added to beautify links
} `json:"data"`
}
type TotalJsonData struct {
Status string `json:"status"`
Data struct {
Counttotal int `json:"count"`
} `json:"data"`
}
type TreeJsonData struct {
Status string `json:"status"`
Data struct {
Id int `json:"id"`
Ownerid int `json:"ownerId"`
Alias string `json:"alias"`
Depth int `json:"depth"`
Name string `json:"name"`
Children []struct {
Id int `json:"id"`
Ownerid int `json:"ownerId"`
Alias string `json:"alias"`
Depth int `json:"depth"`
Name string `json:"name"`
} `json:"children"`
} `json:"data"`
}
func MetricsReallyMonthly(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string) (response []byte, debug string) {
response, debug = MetricsMonthly(server_url, api_token, return_format, mtypeOrMdctypeCombi)
// var newData map[string]
res := MonthlyJsonData{}
json.Unmarshal(response, &res)
intexmaker := func(s string) (i int) {
i, _ = strconv.Atoi(s[0:4] + s[5:7])
return
}
//for i, _ := range res.Data {
// res.Data[i].Intex = intexmaker(res.Data[i].Date) //Filtere den Bindestrich heraus
//}
//sort.Slice(res.Data, func(i, j int) bool { return res.Data[i].Intex > res.Data[j].Intex }) // Sortiere rückwärts
sort.Slice(res.Data, func(i, j int) bool { return intexmaker(res.Data[i].Date) > intexmaker(res.Data[j].Date) }) // Sortiere rückwärts
for i, _ := range res.Data {
if i+1 < len(res.Data) { // Finde heraus, wieviele Werte für speziell diesen Monat gelten
res.Data[i].Countmonth = res.Data[i].Counttotal - res.Data[i+1].Counttotal
} else {
res.Data[i].Countmonth = res.Data[i].Counttotal
}
if _, f := strings.CutPrefix(res.Data[i].Pid, "doi:"); f { // Erzeuge gleich einen Link zum Doi
res.Data[i].DoiDoi = PDPURL + "/file.xhtml?persistentId=" + res.Data[i].Pid
} else {
res.Data[i].DoiDoi = ""
}
}
//sort.Slice(res.Data, func(i, j int) bool { return res.Data[i].Intex < res.Data[j].Intex }) // Sortiere wieder vorwärts
sort.Slice(res.Data, func(i, j int) bool { return intexmaker(res.Data[i].Date) < intexmaker(res.Data[j].Date) }) // Sortiere wieder vorwärts
//log.Println(res)
debug += " #enhanced by monthly count (mount)"
response, _ = json.Marshal(res)
return
}
func MetricsReallyMonthlySpan(server_url, api_token string, return_format ReturnformatType, mtypeOrMdctypeCombi string, timerange_span [2]time.Time) (response []byte, debug string) {
response, debug = MetricsReallyMonthly(server_url, api_token, return_format, mtypeOrMdctypeCombi)
//timerange_span[0].Format("2006-01")
//timerange_span[1].Format("2006-01")
//res := monthlyJsonData{}
var res, res2 MonthlyJsonData
res2.Status = res.Status
json.Unmarshal(response, &res)
for _, v := range res.Data { // Finde heraus, wieviele Werte für speziell diesen Monat gelten
if func() bool {
ts, _ := time.Parse("2006-01", v.Date)
if !ts.Before(timerange_span[0]) && !ts.After(timerange_span[1]) {
return true
} else {
return false
}
}() {
//debug += fmt.Sprintf("gefunden %s", v.Date)
res2.Data = append(res2.Data, v)
}
}
//debug += fmt.Sprintln(res2)
//debug += fmt.Sprintln("T E S T")
response, _ = json.Marshal(res2)
return
}
func MetricsTree(server_url, api_token string, return_format ReturnformatType, timerange time.Time) (response []byte, debug string) {
var err error
var header map[string]string
header = make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(return_format) > 0 {
header["Accept"] = string(return_format)
}
//log.Println(header)
response, err, debug = connect.GetRequest(server_url+"/api/info/metrics/tree"+func() string {
if !timerange.IsZero() {
return "/toMonth/" + timerange.Format("2006-01")
} else {
return ""
}
}(), map[string]string{}, header)
if err != nil {
log.Fatal(err)
}
return
}
/*
func ListUsers(server_url, api_token string, sorted bool) string {
response, err, _ := connect.GetRequest(server_url+"/api/admin/list-users"+func(s bool) string {
if s {
return "?sortKey=createdtime"
} else {
return ""
}
}(sorted), map[string]string{}, map[string]string{"X-Dataverse-key": api_token})
if err != nil {
log.Fatal(err)
}
return (fmt.Sprintf("%s", response))
//curl -H "X-Dataverse-key:$API_TOKEN" $SERVER_URL/api/admin/list-users
//# sort by createdtime (the creation time of the account)
//#curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/admin/list-users?sortKey=createdtime"
}
func ListUser(server_url, api_token, id string) string {
response, err, _ := connect.GetRequest(server_url+"/api/admin/authenticatedUsers/"+id, map[string]string{}, map[string]string{"X-Dataverse-key": api_token})
if err != nil {
log.Fatal(err)
}
return (fmt.Sprintf("%s", response))
}
*/
/*
func ToggleSuperuser(server_url, api_token, id string) string {
response, err := connect.PostRequest(server_url+"/api/admin/superuser/"+id+"", map[string]string{}, map[string]string{"X-Dataverse-key": api_token})
if err != nil {
log.Fatal(err)
}
return (fmt.Sprintf("%s", response))
}
*/
/*
func CreateAuthenticatedUser(server_url, api_token, params string) string {
response, err := connect.PostRequestB(server_url+"/api/admin/authenticatedUsers", []byte(params), map[string]string{"X-Dataverse-key": api_token})
if err != nil {
log.Fatal(err)
}
return (fmt.Sprintf("%s", response))
}
*/

View File

@ -0,0 +1,22 @@
# Basic Go makefile
GOCMD=GOOS=js GOARCH=wasm go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
all: build transmit
build:
$(GOBUILD) -o app.wasm -v
dbg-build:
$(GOBUILD) -v -gcflags=all="-N -l" -tags debug
test:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
transmit:
scp -r app.wasm root@10.23.45.27:/srv/Data/ArchiumToolbox/Toolbox/static/wasm/
# scp -r app.wasm root@10.23.45.26:/srv/Data/ArchiumToolbox/Toolbox/static/wasm/

BIN
goMetrix/app.wasm/app.wasm Executable file

Binary file not shown.

174
goMetrix/app.wasm/aux.go Normal file
View File

@ -0,0 +1,174 @@
package main
// Tux
const imageByteArrayAsBase64 = `
iVBORw0KGgoAAAANSUhEUgAAAJgAAAC0CAMAAABfch
VeAAAC/VBMVEUGAwkBAg8ABgkEAAYLBAIIBQsCCQwICwYMCQ4GDA8QCggTCgEVDg
ULERMPEQ0SDxMUDw4aEgMQFBYTFBIWGBUgFwYbGBcaGBsaHBknGwUgHiEeIB0iHh
0tHgMiJCEvIgkoJCMnJSg1JQYmKCU8KgcrLSovKyo+KBMrLS87LBBBLgU3LxtHLg
gwMzUyNDE3MzJMMgVJNwk4OTdMOQJSNgM4Oz0+Ojk8PDVYNwdVOQdSPAg+QD1ePA
RDPz9YQgVTQRpBQ0JeQAZlQgJGR0VuRAdrRgdKS0loSwl0SQNUTz5yTAJTTk1NUV
NPUU5uUQV7TwBVV1RaV0qAUwV9VwaFVgCLVgNhXlFdXlxsXUNdYGOLWwWBXhGGYQ
aPXgCTXABlZmSZYQSWZASPaQqVaA6baAxsbmyhaAGMayuWbgCPcBKbbQKfawN0cW
SYbCGkbwlzdXKbdQmscACocwCidA2GeGJ6e3ilewOhfQSeeSezdgF4fX+veAmsew
qyewCKf1x+gH2ifDiygAW3fgSthQO1fhOZgVKEhYOygiC8gw2+hQC4hRK7hwDDiQ
WMjou4kQSli1u/kAPCjQ3HjA3KjgC7jyrHkQC5jjnNkQKUlpO1k0/UkQrJmAfRlA
rOlwvWmADFoQDKngXTmwCvmm7GmjDRngCdn5zXngTbnAWinZyunYC3nmTaoQ3Vni
7OqA7VpQzepADApGXUrQDipwOnqKXbrQTZpyvgqwfmqw3qrQDisgDnsACur6y7rZ
TZtxHrtAPfuwHwsgbkugW9sp+7s6bquQrVt071twDvuA7ztg/pvgDuvADzugC2uL
S8trPxvgDpwwD2vQDLuonuwgDuvSb0wQO7vbrBvLruyAjDv7HwxB3rywvqv1nAwr
/Gwb/1zgHtzSTFx8TKxcTx0Rr10wXsx2bMybrJy8j02A/x1yD01zDO0M312DvV0c
P22EbT1dHl17Hc2MnY2tfk4NHe4d3x4rnj5eLo6ubr7ur18eLw8u/19/P5+/f6/P
n7/fr8//sGU4jmAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx
MAAAsTAQCanBgAAAAHdElNRQfUChwRIgJBXOpUAAAcEUlEQVR42u2cfVzT953A2y
SQEDUqoCCxKMV0zmlKc7ZXDV2t1IezUjkfxs2paFtYW1ao6bAPyFhpx0grtoWu0h
pZ6QS6ccoVLGBoU6gcwQbR4xrYPGxTvbFKb9xlGUmT38PrPt+HXx4oIJaH+Ee/rR
ESye+dz/Pn8/3+uOmm79Z368ZfYv91Y1LdOHDiUdYNihVstLG4JEFEGxVKJBHBQ9
CkNipXqCJCESoKmj5H5ZIqlCqVMkKCvr75RrIvabRqzeYktVIqCQrZGGBKdXJa2m
aNUhEMbY7hj2FKbWp2dmqSKloaBLKxwGIBLD01SR0bKZ12sLEimBTA0lOTtWpVtE
Iy3WRjcIkUsdrk5CSNKlYZKRdNM9hYAhMrlGqNWgVUirBpz05jgkkjlbHzFdKgpM
2xuEQSqUIuCXjq5htCYEAWtFJDfN3rO7AbHUwi+YY9wVMSuTQ0JChkFEEqV0RGyi
UjBYx4dVRIsMAk0hBJmHJpfIQowB1DZGGyEFGE9h6lKDhgqHgODZXNilPN9yvzZb
Pj71q/fkVU6Oylt0cESWIh4bcnaeNnzYpXyb2Xn61OTs8vLi5O14bNWhwTGhyJxa
YUVlbmr4maFaMQ5BWlTcsvrqyv7zz3rnaWfL40KGBRKcX11r7mws1REqmIgIUnZQ
NW87ke2xfWfA04pygIYDJ1TuU5W19Pff4aeQgBCFWll527NDBotzsGrGVp0SJRMC
Q2J6Xs3OCQy+n4olIpGFh6/aDLwzIehvE4Owu1sumPF2Bhiwu/cDqHnB6OcW6mko
mrdzA85+yrbB70MG5bekwwwMTqTpejOC2n2c2x7yLRSEQibZ+L453ZMbNvS2l285
7OO0VBAAtNHnQWxyxcn1rv5m0xEkkINJGbbW7eVRYVEpeamtLMcI7U0CCAyX48ZL
tHFJudktLPOdRSqSJSKnkAwGx3isXh63MeeABElh8eDLA0Z2WMWJaSqqn0OLQRkX
Ga25UAxhTOBvuLSU6OHeCYypjggBWDQFTJmhyXXatQRCpV8Vqr2/PjUDy7UEc3s0
x9XBDAwn48VBwtFs1ZEZPq6FwokUqg0I/MtrtTSE0RFlrJMM3BAJOlOupjwQeiIl
L6f7bkjtU/XP0Pdyz6kdWVKgQvJLH4IICFJA323YOkI/mndx579SRab7/w2Dv/lz
+bYIQ7OE9ZMGxMvMLqKIwSiWYs+cmBo8a2ttOnTx49/PaJf//DD3DmnpXGsM6ccF
EQwGLKnPbk0JmrHj740nFTa1tr64nDT/+2te3E06vnIgsc4Jn+zcEIsCCTQU//P2
/SvVbRYDQD10cfffjeh+d7u1tPvPDgvT8bAIGVxQUlJYnubHb+7c28Q1VNJnNbW+
v58xc///zzq5cvX+49e+rt3/3H/wzZHgidfrCbUd2T9vEbBSVIXiCws+cvXv7yy6
tffXX1L1c+6+1qO3X89ceWSYMiMbH03mee1xtqGoymtk/Onu+9eOXLqwD25V+uwP
rss+62mgPLJMEAk966TVdUWlFrNAEYKPLilatf/RUERteV3j+demiBJAj12LxNug
IQWJ0RTAwJ7PLlr/76V4HrypWPPvxT24FbgyAyybLMPH1JeZ0RwM52g8AuX/Xjun
jihVcbGp5cFAQw+X1IYFVegV0BgV2l0rry0eHDr1bUHN81LwiBTLEht6CkvAZiBQ
LDAgOHxFggrpePVNRUVeyaK5p2vxRLVz988DdVtQD2SdfZ3l6wsKtXsENe+fDw86
Xl5TVV1YZtc3FfHDKtYJK5CdsOHK9rMZu7upBLfknixMWPfvt8AXBVVZUbXlqNTC
wsbml4yDSCiSULEoHMZLZ0dYMiL2Pjuvjh4QMH9Yby6qqqilL9T+bhnm59+gPxsm
nbikON5R0Pbnv0aENbd+/FzwEMCeuFA0/lHjKAvCoMr73x5s9VSFJhmvTn0pKWhk
0bmEj+j7/46bZdTx4+8SHK3ycOv3BQp8vVlxoM5RW/Kfndv31wpjkNNSOhypTn8p
9LjZsmkSGw1ObfP7Tv4YeffBqtAwcL9PqS0iMGQ2npodf/8PEfe3qsZWokslB1+n
PP5STNnzawOdnWzncezsw6ePS9904eP2aAVfpWaWmJ/qU3P7Da+m191vokVGeLol
Py8/PT1LJpIYMooMyxWs+98vAjT7108lQDOOFbb71Vckivf+mNP5yx9vTZBmyXOt
PmoOmeRJX+XHpS9LTsKqFaf2F2p9V65pUnHtG9XGo4AqI6VFRQUPDSGx+c+2OP1T
bgcNj7370NBQxRpDZlfZxsWkIGuhwG6znzzhP7MnOBqCBPl5Gh+/WbH/TAszb7kN
vjcQ6k4lmjSBYVJZuWIIuvFplt/aKvp+fc718BtMzMjIxHHnnmzXfOAFffFw43w3
Ic46y/LTApiUMkUw4WEp0/MGgD3wO0X/3yiSeeeOaX73xw5lxPp7VvwOFieLQYR9
rwcb9kqrnEYSn9TsdAnxWtznNnPv74DESInnNW6xdeLp5n+5XDwEJCp3r3Ia4ejM
hOwITVg7zR7nB5OArGu9NnS4Zt/0qnDEyO9kJmpzk5Fsy7z9rjR9bXP+hwun1cPE
vadb8lnzJlyiMipSKx1gqXZzyOfiwpynVpwD7k8jA+Lp53Fs4ftpkpmiLPFEsUEX
Lx7DInC5fl3P7KtA2CFj2cPxfP2LSS6dmJQ/YbIlvvIPbtGRoQyCBIOFGU4AMW58
yZMy17hOSdF1ZSv2PdQwM2hNaDxcWw/PDFNA+PZVNCRo+iZA95JcK4nfbBQWTzDM
ePtFxpoVMPRt93hZXxu7LHNQSeOIKwKHpx1JRv+NJ3Dc9xBlzaA1j8qIvrVE/5Vj
R9U22nx19rHDOKEunLgw9IppiMvuWsdIeHDQAbk4t1ps2Z2u17IQ2rK4cCwMYk4x
iPuzh8Sg8WeI8UpXQOA+NH1yXj8bjd1hjJFJJ5U0pkWieUW34yQVf/pk+yHMswHp
fT5XI6/PamJ53Ml+uis5sHnB4a4uHqIBO4vIeBZ6A4RH9YQIKn0fNDDodjaChJLp
l6MMniwnqr3QnXZdDyuJ1DaDldEDPQU/DoBinBs1D12wcHBiCx50RIpkpkfmc91G
WVzX0DhASBubBU4FuGxaiQChwA1N/fb7N9Yeu7BIVj3wOyqTpZ43urSG1lZX2nzY
7qLqQ8hnE50NcMg8wNbIvxOB2OQegr8erpuXRpwNG5AuVLUXjYZIP5lcbKJMSFCx
zqAZ4hp8e/qEARggjNBnSXLvXZBofql6KMobkzRja5ZH4FqDK1vqffAdYPRs4jNM
7jdLOCJ6IHZP5g+6BixIbEBv++EGJZSIxWs3j2ZA7zqD/i0xbqskuDICEcuRigYB
EYeCPHwLfob6xQ7J0QLYbsAzbbpb5Bpz1tFvKcKLVaOYn7EoRLrhCLQ6PTkUuyLE
iHAMD1kbEBD/mfQa+guIG/IWiXbHaXVUPMbKlGKZtUMJEyPjJEHKY5Z0dNECYBzb
E4jiK5wddYi5iI53j6FYvQ+m39DlcO2TCULb5LOVnDbMy1UBMFOojJB6sn8qF0JF
MSFZIvkMBYIkD0N3gpkA04++4k/ZIk/vYI0eSByTXx8L6SpD5UqIKUeEIhMHLCol
mKI9LD/4jFZHZnPj6eIRGHxd8mnxyRoZ+O1iJNzCoGO8cSYjiGKA4esVIFvwQf4P
xqHvQyz7js/f3OwcXk5ogwhWqSDnDh80RIYKH39DP4asTueWr/DA0VHA1siJbwUv
/kGZCZ3Z0uEYcoomOVCuWKSMkkgOG2SI1qqphKt6A4bO3IhGglAQ88eZ4htk+wsP
RQ5HAPOVzWKLE0UqVVx0aoVLJJEBk+SLcU3km2eRAZNUvgqOn7LeoCLE+sH8dbYo
TgsJAohpLEYdHqNVpVRKQ6SjQpYAu1UXgb3CMgkFCPoxlojaiVoR5J/vD4AT9yNO
h58qWKWM0aTXyEVKWWTxgMxZ7bkMDCUga5YQvhQPnKCt7JUfkIXwgP9LXOiAilSh
0fKRWFa2MnrEuUfdVUYDy5kt9C1StP3QAD0SIDf0MjHEQXwjyoUkRERqJblkI02o
maPwqu8Wpw75C77BxtO+Aa9FI863Z6cM3K0UyJDB5nApzgWQqNjZId2iwSThovvG
cSwMI06MjJnHwGAfHE7CkFwzgRGL44iWtCxEDf00iGIwf6xv2c1xnl9ygmqEtUUd
wFwTVUY/M5HieUEVBaOBleICLZCHsBkhtCw17CYMVCHfKud1og0ign5pdo0qZeCu
+hSHcJSdAvBbGeIRfDe1O3gOv9gmRRXqhDOr1nRETqCfolZDdFUjjq2jpZGu1JJc
ETJ3CjmZj3yn6LRjPsD96P03+nl2XpXWET0SXacVFqIRuJtEM4QvE879UoXJh1gc
RIuPAGMPLPSJRgacSlIc2+3gemDp0YmFisug2l7xwSXBksLJIxUU3jRLNzqjbshw
zOULiqIFJDLkKyOcc5Un1gKyZS++DKToPSZHwzQ4Ilqb9YoQlHYCxeWDBC4Y9qDK
El9jUqnDPdBzah43jISudrQOaipAGGVK2kXmBxOmIJGIVkKTkvkCAHJbGWIb7Ju7
K90WvpRE69kdL1dniz0LQhv4xNY6YXjKXmzuL6mhdsn+YCIb7Av/IUCvqTqSdwFp
X4tfIuAFMUu3nW3/VYkrahuYUWwD9J0aDmq9a81g9/PMWCxcs0E2iWSImu1MKnVN
Z7hLKCxeGJ+B/rcRAwlvNBEzLGh0vUjzVfLMSIWZpv3/jSSKhMgmih6mSoy/OCKr
EVITCGhg6O98Z/jmZyocmkjRPPlAk5ab5GMkEwWUxyKBQDaE6N8x1DjJshRi6A8Y
QEtQK0mhZc1VeHw1dMGT30KY5Vf2sw732v6wFsjY2hiQgbNcPjcM5gVeJwgZXH+H
I5683l6AmBj60UTF6lFE8MLCRSlTJLLEseEPprnhcuii7kcQzh6SInVNuckB5pHi
KRT4h6jAAmWzpngmCKeE1alDgsddDPvIWmA6VKDMZyrPd51uuznM/sWJqnmEpaXk
TFhU4UTJWUvlgcnu7gaGlP+gshqLkIGKkdAuoOb8zwCySgSgImiosO+bZgwt3789
Vpt2MwkpNJvUDbEF6QGCvELZrl+UDF4qiL4j/zLjH+WfHh4gmCoVMTWnFEtsNbvH
DeOYUXjCiQ9JmC/Lx1tjeWweueYhIulPGyCYOJQ6DsicLbbbThpx0HEgLrdjjJzF
/wQ5IjfRsTRO0sKYA4d6GM3EiulIVIJZKJgYlDlSpluoNWyXg6R6plXFkjidH6AS
dxrDV4meX90ipt03kWVRei8Di1KlIeqYyNjZxFD5Zdp+1L5i66ddFcKbSV2nQ7S6
dOdC5HOn+QGN4loTMDGipw98F48xN1YKRkR4pYFqlSRigk4jBFhDI2Pj52/nUfRp
LOW73r1aOvPnaHVCxfmj5AClSGJZenvSSyMQ/jl7xZau8kLxDDopU4UrHtztDIaO
HAg0gSFhWnTdYorhMsYdvLdWaLxXh0w0zx7HveddL8yPpPKDAYG9ics976InCyAR
r3VMZERIX6V66hMcmp6jnXd7Ag97UG8wVYluMPSkWK9fVummpw/hOCLQITQggv5H
YqO9arSogUX/8d1v/+Yl70sFG/VLNeO//6wEpqmlouULKZoghNpYujhSpNMixVJR
2QMXiITbthGoGF2pb9+3/9J1rvP/b9wCPr4gg1mmVcD5jeUGvqsAhkM0RhQMYIOZ
LHWRlMDoORKpoXGih4iYyLOU5oxj3/bepGh9a7374jECwkVhU7Z8EPr4cLnaM2E7
ALlrfBzsJUhXa0xYYLGooHKQnN1lnS2WEx+jI89VCE/PVJ46efoXOyhwOP0osUyu
gI+Ya3z18H2JHqRkFiFy6YX10tFUtVOQN45wGXfFgcOPKz3okdyadC+mY5Wldy/N
c1deau7s8+630h8Fy4eHakVLroydYrV8bLVVRiqG00WSyUrKvt6SUSsSQ21eqmEY
H2RO4haHj9jD+w8vfmVAAzWS582tv65IJAMIlIPPPBE71XrlwcryLRSX1Bk4js1G
NzxSJp5Pp3XSznN5pg0IiApmvvhhLrq44o5NfvI7Cus8PuPcBoyw63dvd+NrYyi4
peLkInIIGrug4J7IKP7PgGeMsQubrSKYwHsMEzHkYoCPHIwDsLYoWZNcL8+v1aeL
dP2o4/futwsHm7TnV3d33adnRUqgJQ37FjBkNpSYmhoqquqcUPC9bZV5fgiLg4fc
C7CchhYZF2VtjdYv2CBM0SHtff3q9tsVjMDVUHV84YFscePNra2vaJxfTaaFzP6w
3lNbW1tTVVVVW1dY3GAHnB6m59lBzPD0+1erCvsST8g8GTighPEqmQyIAAq5dxOf
r/DBIzm011VUXbbvEvKiQzVr/W0NpmNlsaRgUrMlQDT1NTXWNdXZPJZA7AAsju3p
MPzsQ3g4etqXeSRttrVzwntEp09E83wBCy226z/fH9WqPZZKwt1+s2LJCIvFi3bC
qqajgNzO2NJaNwvagvr200tphMJmMTWL3FMhysq7f1BRqEZmuKB8n4i+YcYYPSO0
eneQFXGY5+DAYftqmuvKQgc9Mtc2fI5RL5zHlL7ttVYKhFNzZZLC0Vo4GVoPs/Ot
rBEszDqASRnT+1ay79qMq0AY9vHMBw3pqCZFOMxpJw6wGBAVgNGEdTXVWpviB336
b7Vq1cuWrDtsdzC0prQD3oguaG0cBKqxpN5naLxSesYTLr6v3osJBQQiJTOz0BG2
64ria9LS9MY/GLBOxfqwGgqbGmHMgKcnWZmZlZuXnP60ur6lpM5JrGUcEgZ3cgJv
hD0ALkZkHx8b2H5gnmEZ7U6abbRwwxfroHQIYWtJQGh3UPIrDfldc2GY2NtRWG0k
N6PQ5J+kOlx4DLTERhaRlFZC++VgUm9g0V+pN92n3+7R96c3BYUqeHZ/z3/1hfNq
djAVT0UzADAmuqqylH58UhIsEDRIG6FuHTm83GmhHBfo1szGyxjAFm6epuPbBIcC
mRPBXsDOMwFJCEC2GuT1IX47Ej438dlGZEIqupLi834FUBUanJ7Hv7UazsIICBGV
4Ya3V1nz+5yzsEFy0sdFEDJ5pjhLkwJ4QObGPYK18vQbo0GRvqIFBWl1dUVFTV1P
oHcQAzjUhWcKgc3WQ0hi6xMluP+m5OlCc7yGiK9kBCee81OLw8QwMIDN7eaESxqK
6WrroGo9/1QCEdppFCRgGKYy0dY4OByE4/usAbt1cMcv7CoS2a0KrT/M24Bm2X6n
/9MlQrLRAmW4wQwNGCWG4MEATIbEQzQ3f+XQsMQsb5ow96RaYaIDWXcMqCZ/2ada
FIY1x227kfPaXHYB3mjhYwNSNAGdHtfJZAMLO5oWaEyjCw0BmRDBLT6eeXCMluhZ
2kbs67l0RHjkJHggd9AJbzg8cBDCofFCfNKL2A6Fpa0LfDPvkIQisqrR5bYhYUcb
u6e089uoiOkgpdgvsRj2ToZgNHWkoWj1FYV3/+4iVZyFJMLThmteMwbvaP5T4yi6
Xh+DfBxpQYjruW7t6zRzfMEIlFsphsO8Mx3szN0bpCaJGE0sgzmLNYvuRxDCYkOx
xRR7WXtpo3AsHAb8YGQ3+6ui+2Hlg2P0aT3uwku6QkXPCM/+Yz560WGXt2FLpLVF
9R22CyWMY0FeFC5sYAG3sL4kXH6B9FcEyw/5MP/UuZbYgRqmnWe1SA8wsaWIispz
89SiSWr0RgTSbzeMig0ggEK62uNVpoorSMQXb2fOvRZ/7si6Uke/uqC1/RD9HVuh
lN6mbcl/lyBWluLNfEGg52qLS8rkWwR8uFkd8Cvdx1/vypl15xCzuB3uztd7yHap
R1V5JNyblrEZjR1D4eLrO5sc6PKw+D+VWII7+HhYjs+FNnGI4O7+jQHz+SkQVLn3
MWx5FJ67wNmUVUldcEM7c01tUERH4ULtqvJWz0+icgst/81OZt0lhe4ON8Z4941t
m8Xhig3LLpkYKKOuO1jd9iMTXWVRsCc+WR2qYWyzWtAIGdPX/6+FO/sjO+0bQQHz
i6PQmJyJYT5x1MI7BjUCNc81O3tzTWlhv0ga13eZ1pPFgg7LbW0xXP/+Tng4wQLv
zOtBFGt61wsW8MJlmyaR+AGVvaxy6r2s0tdTWG0hcDc/iRGqNlfGAW0+lTx4t23f
uzTifjOxslbIFBBTbUV7zGf1wOYCCx2rEkhoqLFhBXxZGSEYc710TD7mpsaDj+cu
baRZqcPrdv9w8fLmA9LltZ2l2BU3zp8k2PFx3DljJa4Aabh4Ko2lDyjaIHfLKRtg
WjBDILxYI409BQ9Zpua8LMcHVqcXO/3ely4/PedltzWXby0hhZ4K6HZObyTZkAZm
wxj9B9kf4HhFVtKC158ZtlYikqx8wdQps00mejz4MqmxqqSnQ7E+dJxLLZcZr1qe
k52WmpKclJ6phwecg3f4/0vJVbsqC6GMErkV11tLebm8AVS4oKRioTS6ARh4KpxQ
z/dXSMqVIAq60oyd297lbpuH6FouSWu7fq0G/GMFlGiFq4dKw2FOWOPFCBXqocmp
a6xkZUwplaoOs1+xQ7PNY01Fbodbs3LZ8xTrDE7boi1I20BxaGFlQ1NmLTyhulq8
zDbZ6hvAqNVVDd29gI5Zy5o8Pc7rM5mkbB+OuqDAVZOzfePU80TrCtWQWoG/Ere3
BwQFQ11YZDBVmjz87z8qAHPYRv9C4vr66pwXhQlZtAdu3U7Ohqaaw5VpKXuXNj4g
LJeMCkAJaRh0t3rxYs7R0Yq7rcUKrXjTWz02Vl6nS5zxbg29AJXhUSHsC1CJMDEl
7NTbXlpQX7920fL5jkllVb9u5H9R4aQrTjGrbdbGpqRO1vqf7ZzGsOOPdlZGRm6P
Y/ixSrR+IzYOUCXAuGa4fP2W5GitTnZuzZuu7u8Ups5cY9+/MOgXvBp4RSvwNiqd
FYi2xLX6Ab51R4377MTN3+/bm5uaDbgiIQn6GiGiTXBLEEUgqKg1WGkoKsvTs2rk
0Yr40lbNyRuR/93g5sHdDFNUE0RdLK02Vex4h/547dgJeRkZGl268DPgglBjC7Wu
QSSPyl+oL9e3dsuf/uZdf0ypsx2ILla7fv3Z9XVIpmg3gR2yrQZW693tNGW3du37
lz9x4iP8QGZgdqra4uP1KifxZxbUxMuEUynq2Wm6ULlidu2ZOxP09fcgT9io6qqo
pjpaDE3Mx9277VsclNGzdu2YrEh9wiD6kV1qEiEP8e4Fq7asnM8d4nvGzVxh17s/
YTv4d1CA3Jsh7Z+e24CByi274bS04Hhper02Xs3bEVuEBg8vG+y5KEtSCyLGq36N
cD7Ndl7tyyboJ3siSuBbadu3fvfSRz7969e3aAuNYl3p2wfPzv8P1lq+7fuicjM0
uHrBY+XFbGvp2bEifhPi7EtnXr1u3bd2zdumXLxvsTVy7/3vX8/LLlq9Zu2b4nMy
MT/Z+ZuW/nlk2TdK/gqsS1a9dtROv++9cmrky49fp+fNmyhMR1SO579+3ZvXP7ln
WJCZN2e2VCwt2JeN29MmHZ9677x5ctT0gEwW/cuGnd2vtWLb9pUlcCXsuXfbufXg
Y/u3LlqpXw103fre/WjbD+HzRGTE72Fay5AAAAAElFTkSuQmCC
`

View File

@ -0,0 +1,162 @@
package main
import (
"Toolbox/goDataverseStrict/metrics"
"errors"
"syscall/js"
"git.archium.org/archium_public/ebkTools/wasm"
archiumwasm "git.archium.org/archium_public/ebkTools/wasm"
)
const ca0 = `<canvas id="barChart"></canvas>`
const insebody0 = ` const ctx = document.getElementById('barChart');
//var labelsa = ['A','B','C','D','E','F','G','H'];
//var dataaa = [860,1140,1060,1060,1070,1110,1330,2210,7830,2478];
//var dataab = [1600,1700,1700,1900,2000,2700,4000,5000,6000,7000];
var dataa = {
labels: [], //labelsa,
datasets: [{
label: "Gesamtanzahl",
data: [], //[1,11,10,60,10,70,111,13],
borderColor: "red",
backgroundColor: "red",
borderWidth: 1,
fill: true
},{
label: "Differenz",
data: [], //[16,17,17,19,20,27,40,50],
borderColor: "blue",
backgroundColor: "blue",
borderWidth: 1,
fill: false
}]
};
var fubagchart = new Chart(ctx, {
type: 'bar',
data: dataa,
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
`
func helpTpGetLevelStatus(injectpoint js.Value, meisleisz *[]metrics.OneJumpPointSet, level int8) (result0 []wasm.Checkerboard, result1 string) {
a, _ := metrics.FilterStacklist(*meisleisz, level)
var b []string
for _, v := range a {
b = append(b, metrics.IDRequestCriteriaPrefix+v)
}
result0 = wasm.GetStatusFromBulkOfIds(injectpoint, b)
for _, v := range wasm.GetStatusFromBulkOfIds(injectpoint, b) {
if v.Checked {
result1 = v.Value
break
}
}
return
}
func (gothis *lokalRequestType) changeTicker(s string, l int8) {
dombase := js.Global().Get("document")
//closureGetIdWhichJustChanged := getIdWhichJustChanged()
//log.Println("DIE BACK:", s, l)
//s, l := closureGetIdWhichJustChanged(dombase, metrics.OneJumpPoints)
//FIXME: Aktivierung und Deaktivierung von Datensätzen pro Level funktioniert nicht mehr!? Neu machen, im Moment ignoriere ich das, damit Elfrun arbeiten kann.
actualizeForms(dombase, metrics.OneJumpPoints, int8(l), s)
//actualizeForms(dombase, metrics.OneJumpPoints, 2, s)
}
func (gothis *lokalRequestType) pseudoSubmit(jsthis js.Value, args []js.Value) any {
dombase := js.Global().Get("document")
gothis.Level0MetricsType, gothis.Level1MetricsDataCountType, gothis.Level2SearchType, gothis.Level21UserInput, gothis.Level3ReturnformatType = func() string {
_, b := helpTpGetLevelStatus(dombase, &metrics.OneJumpPoints, 0)
return b
}(),
func() string {
_, b := helpTpGetLevelStatus(dombase, &metrics.OneJumpPoints, 1)
return b
}(),
func() string {
_, b := helpTpGetLevelStatus(dombase, &metrics.OneJumpPoints, 2)
return b
}(),
func() string {
_, b := helpTpGetLevelStatus(dombase, &metrics.OneJumpPoints, 2)
switch b {
case string(metrics.ST1total):
return ""
default:
//case string(metrics.ST2_tomonth):
//case string(metrics.ST3_pastdays):
//case string(metrics.ST4_monthly):
//case string(metrics.ST5_tree):
return dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestTextPrefix+b).Get("value").String()
}
}(),
func() string {
_, b := helpTpGetLevelStatus(dombase, &metrics.OneJumpPoints, 3)
return b
}()
//triggerResultprintation(metrics.MetricsType(checked_type), metrics.ReturnformatType(checked_result), newcheckers, bodyInject)
return nil
}
func removeAllDataGo(this js.Value, args []js.Value) interface{} {
chart := args[0]
//log.Println(len(args))
//log.Printf("%v\n", args)
//_ = js.Global().Call("alert", countDatasets)
for datasetCounter, countDatasets, countDatas := 0, chart.Get("data").Get("datasets").Index(0).Get("data").Get("length").Int(), chart.Get("data").Get("datasets").Get("length").Int(); datasetCounter < countDatasets; datasetCounter++ {
chart.Get("data").Get("labels").Call("pop")
for i := 0; i < countDatas; i++ {
chart.Get("data").Get("datasets").Index(i).Get("data").Call("pop")
}
}
chart.Call("update")
return nil
}
func addAllDataGo(this js.Value, args []js.Value) any {
chart, newdata := args[0], args[1]
var numberOfValues int
if numberOfValues = newdata.Index(0).Get("length").Int(); numberOfValues != newdata.Index(0).Get("length").Int() || numberOfValues != newdata.Index(2).Get("length").Int() {
return errors.New("Inconsistent input data array!")
} else {
for i := 0; i < numberOfValues; i++ {
chart.Get("data").Get("labels").Call("push", newdata.Index(0).Index(i))
chart.Get("data").Get("datasets").Index(0).Get("data").Call("push", newdata.Index(1).Index(i))
chart.Get("data").Get("datasets").Index(1).Get("data").Call("push", newdata.Index(2).Index(i))
}
//log.Println(chart, newdata)
//log.Println(newdata.Index(0), newdata.Index(0).Index(0))
chart.Call("update")
return nil
}
}

252
goMetrix/app.wasm/main.go Normal file
View File

@ -0,0 +1,252 @@
package main
import (
"reflect"
"strings"
"syscall/js"
"time"
"Toolbox/goDataverseStrict/metrics"
"git.archium.org/archium_public/ebkTools/wasm"
archiumwasm "git.archium.org/archium_public/ebkTools/wasm"
//_ nwa "git.archium.org/archium_public/ebkTools/nhooyrioWebsocketAddons"
//"Toolbox/goDataverseStrict/metrics"
)
// Setze und lese aus ID
const (
//ENHANCErecords = false
//ENHANCEebenen = false
DEBUG = true
LOOPTAKT = "0.6s" //Kontschi sagt "0.7s"
PDPURL = "https://pdp.archium.org" //"http://localhost:8080"
SPANSEPARATOR = "bis"
)
/*
var signal = make(chan int)
func keepAlive() {
for {
<-signal
}
}
*/
func getIdWhichJustChanged() func(js.Value, []metrics.OneJumpPointSet) (string, int8) {
var oldIds, newIds []wasm.Checkerboard
internalClosureFunction := func(injectpoint js.Value, ojpsdata []metrics.OneJumpPointSet) (string, int8) {
var founditS string
var founditI int8 = -1 //Default
var tmpIdsS []string
var tmpIdsI []int8
for l := int8(0); l <= 3; l++ {
a, _ := metrics.FilterStacklist(ojpsdata, l)
for _, v := range a {
tmpIdsS = append(tmpIdsS, metrics.IDRequestCriteriaPrefix+v)
tmpIdsI = append(tmpIdsI, l)
}
}
//log.Println(tmpIdsS)
newIds = wasm.GetStatusFromBulkOfIds(injectpoint, tmpIdsS)
if len(oldIds) > 0 && !reflect.DeepEqual(oldIds, newIds) {
for i, n := range newIds {
if oldIds[i].Checked != n.Checked && !oldIds[i].Checked && n.Checked { //newIds[i].Checked
founditS = strings.TrimPrefix(n.Id, metrics.IDRequestCriteriaPrefix)
founditI = tmpIdsI[i]
break
}
}
}
oldIds = newIds
return founditS, founditI
}
return internalClosureFunction
}
func barseTuration(s string) time.Duration {
d, err := time.ParseDuration(s)
if err != nil {
panic(err)
}
return d
}
func main() {
var (
dombase, bodyInject, scriptarea, chartarea, submitbutton js.Value
//dombase, body, body2, butt, , bodyDatabase, bodyTectonics, js.Value
/*TODO: WICHTIG nicht löschen
oldcheckers, newcheckers []archiumwasm.Checkerboard
checked_type, oldchecked_type, checked_result string
*/
)
closureGetIdWhichJustChanged := getIdWhichJustChanged()
//log.Println("started")
//connectionReceive, _, errReceive := websocket.Dial(ctx, "ws://"+configs["websockeIp"]+":"+configs["websocketPort0S"], nil)
//connectionSend, _, errSend := websocket.Dial(ctx, "ws://"+configs["websockeIp"]+":"+configs["websocketPort1R"], nil)
dombase = js.Global().Get("document")
//bodyDatabase = dombase.Call("getElementById", vectorIdDatabase) //.Index(0)
//bodyTectonics = dombase.Call("getElementById", vectorIdDescription)
bodyInject = dombase.Call(wasm.DOCUMENTS_METHOD_getElementById, "injectarea")
scriptarea = dombase.Call(wasm.DOCUMENTS_METHOD_getElementById, "scriptarea")
//formarea = dombase.Call("getElementById", "formarea")
//testarea = dombase.Call(wasm.DOCUMENTS_METHOD_getElementById, "testarea")
chartarea = dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementById, "chartarea")
submitbutton = dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementById, metrics.IDFormSubmit)
var oldPseudoSubmitData, pseudoSubmitData lokalRequestType
//butt = dombase.Call("getElementById", "runButton")
//lmog.Println(butt)
// tmpRohtext := bodyDatabase.Get("innerText").String()
//tmpRohtextTectonics := bodyTectonics.Get("innerText").String()
//bodyInject.Set("innerText", fmt.Sprintf("%v", os.Args))
if DEBUG { // Zeige Pinguin als Zeichen dafür, daß das Programm vollständig durchlaufen wurde
image := dombase.Call("createElement", "img")
image.Set("src", "data:image/png;base64,"+imageByteArrayAsBase64)
bodyInject.Call("appendChild", image)
}
//image2 := dombase.Call("createElement", "img")
//image2.Set("src", "data:image/png;base64,"+imageByteArrayAsBase64)
//body2.Call("appendChild", image)
//js.Global().Get("console").Call("log", "Just another way to send a string to console-log!")
//js.Global().Get("document").Call("getElementsByTagName", "body").Index(0).Set("innerText", time.Now().String())
//keepAlive()
/*
fmt.Println("HIER")
fmt.Println(js.Global().Get("dataaa").Index(1))
fmt.Println("BIER")
fmt.Println(windowbase.Get("dataaa"))
dataaaJS := windowbase.Get("dataaa")
var bb []byte
fmt.Println(dataaaJS)
fmt.Println(bb)
// windowbase.Set("dataaa", js.ValueOf([]interface{}{1, 2, 3, 4, 5, 6, 7, 9}))
fmt.Println("GIER")
*/
//chartarea.Set("innerHTML", "")
chartarea.Set("innerHTML", ca0)
scriptarea.Set("innerHTML", insebody0)
js.Global().Set("removeAllData", js.FuncOf(removeAllDataGo))
js.Global().Set("addAllData", js.FuncOf(addAllDataGo))
js.Global().Set("pseudoSubmit", js.FuncOf(pseudoSubmitData.pseudoSubmit))
//log.Println( submitbutton Set("onclick", "pseudoSubmit"))
submitbutton.Call(archiumwasm.ELEMENTS_METHOD_setAttribute, "onclick", "pseudoSubmit()")
/*TODO: WICHTIG nicht löschen
_, _, checked_result = archiumwasm.GetCheckedRadioOrCheckbox(dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementsByName, "form_results_radio")) //Ändert sich nach neuer Arbeitsweise ja nicht mehr.
var firstTimeEqual bool
*/
for ; true; time.Sleep(barseTuration(LOOPTAKT)) {
s, l := closureGetIdWhichJustChanged(dombase, metrics.OneJumpPoints)
//log.Println("Websocket loop started")
//botz := dombase.Call("getElementById", "input_"+string(metrics.MT1dataverses))
//botz := dombase.Call("getElementById", "form_types") //.Get("innerHTML")
//dombase.Call("getElementById", "form_types")
//botz.Call("createAttribute", "checked")
//botz.Call("setAttribute", "checked", "true")
//fmt.Println(botz.Call("getAttribute", "checked").String())
// log.Println(botz.Index(0).Get("checked"))
// log.Println(botz.Index(1).Get("checked"))
// log.Println(botz.Index(2).IsUndefined())
//log.Println(dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementById, "input_"+string(metrics.ST1_total)).Get("value").String())
/*FIXME: Wichtig Nicht löschen
_, _, checked_type = archiumwasm.GetCheckedRadioOrCheckbox(dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementsByName, "form_types_radio"))
newcheckers = archiumwasm.GetStatusFromBulkOfIds(dombase, []string{
//"input_" + string(metrics.MT1dataverses),
//"input_" + string(metrics.MT2datasets),
//"input_" + string(metrics.MT3files),
//"input_" + string(metrics.MT4downloads),
//"input_" + string(metrics.MT5filedownloads),
//"input_" + string(metrics.MT6uniquefiledownloads),
//"input_" + string(metrics.RT1json),
//"input_" + string(metrics.RT2csv),
"input_" + string(metrics.ST1_total),
"input_" + string(metrics.ST2_tomonth),
"input_" + string(metrics.ST3_pastdays),
"input_" + string(metrics.ST4_monthly),
"input_" + string(metrics.ST5_tree),
})
*/
//dombase.Call("getElementById", metrics.IDRequestCriteriaPrefix+metrics.MT1dataverses).Call("setAttribute", "checked", "true")
//wasm.GetStatusFromBulkOfIds(dombase, metrics.FilterStacklist(metrics.OneJumpPoints, 0))
//testarea.Set("innerHTML", fmt.Sprintf("OneJumpPointSet: %v<br><br>", "TEST"))
//log.Println(oldcheckers)
//log.Println(newcheckers)
//log.Println(reflect.DeepEqual(oldcheckers, newcheckers))
/*TODO: Wichtig nicht löschen
if reflect.DeepEqual(oldcheckers, newcheckers) && oldchecked_type == checked_type {
if !firstTimeEqual {
firstTimeEqual = true
//_, _, checked_type = archiumwasm.GetCheckedRadioOrCheckbox(dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementsByName, "form_types_radio"))
//_, _, checked_result = archiumwasm.GetCheckedRadioOrCheckbox(dombase.Call(archiumwasm.DOCUMENTS_METHOD_getElementsByName, "form_results_radio"))
triggerResultprintation(metrics.MetricsType(checked_type), metrics.ReturnformatType(checked_result), newcheckers, bodyInject)
}
//windowbase.Set("dataaa", js.ValueOf([]interface{}{9, 2, 3, 8, 5, 6, 2, 1}))
// _ = windowbase.Get("fubagchart").Call("update", "")
} else {
oldcheckers = newcheckers
oldchecked_type = checked_type
firstTimeEqual = false
//scriptarea.Set("innerHTML", insebody0)
//dataaaJS := windowbase.Get("fubagchart")
//_ = dataaaJS.Call("update", "")
//_ =js.Global().Call("alert", 123)
//windowbase.Set("dataaa", js.ValueOf([]interface{}{1, 2, 3, 4, 5, 6, 7, 9}))
//_ = windowbase.Get("fubagchart").Call("update", "")
}
*/
pseudoSubmitData.changeTicker(s, l)
if !reflect.DeepEqual(oldPseudoSubmitData, pseudoSubmitData) {
pseudoSubmitData.triggerResultprintationGedöhnz(bodyInject)
}
oldPseudoSubmitData = pseudoSubmitData
}
}

267
goMetrix/app.wasm/output.go Normal file
View File

@ -0,0 +1,267 @@
package main
import (
"Toolbox/goDataverseStrict/metrics"
"fmt"
"log"
"strconv"
"strings"
"syscall/js"
"time"
"git.archium.org/archium_public/ebkTools/wasm"
)
type lokalRequestType metrics.RequestComponentsType
func metricsSelectDispatcher(server_url, api_token string, rcs metrics.RequestComponentsType) (mdat []byte, mres string) {
var err error
var mtypeOrMdctypeCombi string
//var header map[string]string
header := make(map[string]string)
if len(api_token) > 0 {
header["X-Dataverse-key"] = api_token
}
if len(rcs.Level3ReturnformatType) > 0 {
header["Accept"] = string(rcs.Level3ReturnformatType)
}
switch rcs.Level0MetricsType {
case string(metrics.MT7makeDataCount):
mtypeOrMdctypeCombi = rcs.Level0MetricsType + "/" + rcs.Level1MetricsDataCountType
default:
mtypeOrMdctypeCombi = rcs.Level0MetricsType
}
switch rcs.Level2SearchType {
case string(metrics.ST1total):
mdat, mres = metrics.MetricsTotal(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), mtypeOrMdctypeCombi)
case string(metrics.ST2tomonth):
ts, _ := time.Parse("2006-01", rcs.Level21UserInput)
mdat, mres = metrics.MetricsToMonth(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), mtypeOrMdctypeCombi, ts)
case string(metrics.ST3pastdays):
mdat, mres = metrics.MetricsPastDays(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), mtypeOrMdctypeCombi, func() int {
r, _ := strconv.Atoi(rcs.Level21UserInput)
return r
}())
case string(metrics.ST4monthly):
if len(rcs.Level21UserInput) >= 17 && strings.ContainsAny(strings.ToLower(rcs.Level21UserInput), strings.ToLower(SPANSEPARATOR)) {
ts := func(s string) [2]time.Time {
defer recover()
rowvalues := make([]string, 2, 2)
rowvalues = strings.SplitN(s, strings.ToLower(SPANSEPARATOR), 2)
return [2]time.Time{func() (r time.Time) {
r, _ = time.Parse("2006-01", strings.TrimSpace(rowvalues[0]))
return
}(), func() (r time.Time) {
r, _ = time.Parse("2006-01", strings.TrimSpace(rowvalues[1]))
return
}()}
}(strings.ToLower(rcs.Level21UserInput))
mdat, mres = metrics.MetricsReallyMonthlySpan(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), mtypeOrMdctypeCombi, ts)
} else {
mdat, mres = metrics.MetricsReallyMonthly(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), mtypeOrMdctypeCombi)
}
case string(metrics.ST5tree):
ts, _ := time.Parse("2006-01", rcs.Level21UserInput)
mdat, mres = metrics.MetricsTree(PDPURL, "", metrics.ReturnformatType(rcs.Level3ReturnformatType), ts)
}
//log.Println("DEBUG:", mtypeOrMdctypeCombi)
//res := metrics.MonthlyJsonData{}
//json.Unmarshal([]byte(data), &res)
//log.Println("TIE BREAK", metrics.JsonStructSelector(mdat))
if err != nil {
log.Fatal(err)
}
return
}
func (this *lokalRequestType) triggerResultprintationGedöhnz(injectpoint js.Value) {
injectpoint.Set("innerHTML", fmt.Sprintf("%v<br>%v<br>%v %v<br>%v<br><br>", this.Level0MetricsType, this.Level1MetricsDataCountType, this.Level2SearchType, this.Level21UserInput, this.Level3ReturnformatType))
data, request := metricsSelectDispatcher(PDPURL, "", metrics.RequestComponentsType(*this))
//res := metrics.MonthlyJsonData{}
//log.Println(json.Unmarshal(data, &res))
//fmt.Println(res)
htmlstring := fmt.Sprintf("DIE BAQUE %s<br> %s<br><br>", request, data)
//log.Println("DIE BAQUE", htmlstring)
//res := metrics.MonthlyJsonData{}
//json.Unmarshal([]byte(data), &res)
//log.Println("TIE BREAK", metrics.LinkifyDoiDoi(data))
//https://planetary-data-portal.org/file.xhtml?persistentId=
//var htmlstring string
//windowbase := js.Global().Get("window")
injectpoint.Set("innerHTML", time.Now().String()+"<br>"+htmlstring)
//res := metrics.MonthlyJsonData{}
/*
json.Unmarshal(md, &res)
label := make([]interface{}, len(res.Data), len(res.Data))
bar0 := make([]any, len(res.Data), len(res.Data))
bar1 := make([]any, len(res.Data), len(res.Data))
for i := 0; i < len(res.Data); i++ {
label[i] = res.Data[i].Date
bar0[i] = res.Data[i].Counttotal
bar1[i] = res.Data[i].Countmonth
}
//log.Println(res.Data[0].)
_ = windowbase.Call("removeAllData", windowbase.Get("fubagchart"))
//_ = windowbase.Call("addAllData", windowbase.Get("fubagchart"), js.ValueOf([]interface{}{[]interface{}{"Aa", "Bb"}, []interface{}{9, 2}, []interface{}{2, 9}}))
_ = windowbase.Call("addAllData", windowbase.Get("fubagchart"), js.ValueOf([]interface{}{label, bar0, bar1}))
*/
}
/*
func triggerResultprintation(teip metrics.MetricsType, riesaltformat metrics.ReturnformatType, deineCheckers []archiumwasm.Checkerboard, injectpoint js.Value) {
var htmlstring string
var windowbase js.Value
windowbase = js.Global().Get("window")
for _, v := range deineCheckers {
if v.Disabled == false { //= the single one, that is enabled
switch v.Id {
case "input_" + string(metrics.ST1total):
md, me := metrics.MetricsTotal(PDPURL, "", riesaltformat, teip)
htmlstring = fmt.Sprintf("%s<br> %s<br><br>", me, md)
case "input_" + string(metrics.ST2tomonth):
ts, _ := time.Parse("2006-01", v.Value)
md, me := metrics.MetricsToMonth(PDPURL, "", riesaltformat, teip, ts)
htmlstring = fmt.Sprintf("%s<br> %s<br><br>", me, md)
case "input_" + string(metrics.ST3pastdays):
md, me := metrics.MetricsPastDays(PDPURL, "", riesaltformat, teip, func() int {
r, _ := strconv.Atoi(v.Value)
return r
}())
htmlstring = fmt.Sprintf("%s<br> %s<br><br>", me, md)
case "input_" + string(metrics.ST4monthly):
var me string
var md []byte
if len(v.Value) >= 17 && strings.ContainsAny(strings.ToLower(v.Value), strings.ToLower(SPANSEPARATOR)) {
ts := func(s string) [2]time.Time {
defer recover()
rowvalues := make([]string, 2, 2)
rowvalues = strings.SplitN(s, strings.ToLower(SPANSEPARATOR), 2)
return [2]time.Time{func() (r time.Time) {
r, _ = time.Parse("2006-01", strings.TrimSpace(rowvalues[0]))
return
}(), func() (r time.Time) {
r, _ = time.Parse("2006-01", strings.TrimSpace(rowvalues[1]))
return
}()}
}(strings.ToLower(v.Value))
md, me = metrics.MetricsReallyMonthlySpan(PDPURL, "", riesaltformat, teip, ts)
} else {
md, me = metrics.MetricsReallyMonthly(PDPURL, "", riesaltformat, teip)
}
res := metrics.MonthlyJsonData{}
json.Unmarshal(md, &res)
label := make([]interface{}, len(res.Data), len(res.Data))
bar0 := make([]any, len(res.Data), len(res.Data))
bar1 := make([]any, len(res.Data), len(res.Data))
for i := 0; i < len(res.Data); i++ {
label[i] = res.Data[i].Date
bar0[i] = res.Data[i].Counttotal
bar1[i] = res.Data[i].Countmonth
}
//log.Println(res.Data[0].)
_ = windowbase.Call("removeAllData", windowbase.Get("fubagchart"))
//_ = windowbase.Call("addAllData", windowbase.Get("fubagchart"), js.ValueOf([]interface{}{[]interface{}{"Aa", "Bb"}, []interface{}{9, 2}, []interface{}{2, 9}}))
_ = windowbase.Call("addAllData", windowbase.Get("fubagchart"), js.ValueOf([]interface{}{label, bar0, bar1}))
htmlstring = fmt.Sprintf("%s<br> %s<br><br>", me, md)
case "input_" + string(metrics.ST5tree):
ts, _ := time.Parse("2006-01", v.Value)
md, me := metrics.MetricsTree(PDPURL, "", riesaltformat, ts)
htmlstring = fmt.Sprintf("%s<br> %s<br><br>", me, md)
}
//md, me := metrics.MetricsTree("https://pdp.archium.org", "", metrics.RT1json, time.Time{})
injectpoint.Set("innerHTML", time.Now().String()+"<br>"+htmlstring)
//log.Printf("WASM: %s<br> %s<br><br>", me, md)
}
}
}
*/
func actualizeForms[dings metrics.MetricsType | metrics.MetricsDataCountType | metrics.SearchType | metrics.ReturnformatType | string](injectpoint js.Value, ojpsdata []metrics.OneJumpPointSet, startlevel int8, startindex dings) {
//disable all
//log.Println(startlevel)
//log.Println("HIER")
if startlevel >= 0 {
for i := int8(startlevel) + 1; i <= 3; i++ {
list, _ := metrics.FilterStacklist(ojpsdata, i)
for _, idmark := range list {
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+idmark).Call(wasm.ELEMENTS_METHOD_setAttribute, "disabled", "")
}
}
/*
for i := 0; i < len(ojpsdata); i++ {
log.Println(startlevel, ojpsdata[i], startindex)
}
*/
//enable any
for i := 0; i < len(ojpsdata); i++ {
if ojpsdata[i].Active {
switch startlevel {
case 0:
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(ojpsdata[i].Level0)).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
fallthrough
case 1:
if startindex == dings(ojpsdata[i].Level0) {
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(ojpsdata[i].Level1)).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
}
fallthrough
case 2:
if startindex == dings(ojpsdata[i].Level0) || startindex == dings(ojpsdata[i].Level1) {
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(ojpsdata[i].Level2)).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
}
fallthrough
default: // ist in diesem Fall identisch mit case 3:
if startindex == dings(ojpsdata[i].Level0) || startindex == dings(ojpsdata[i].Level1) || startindex == dings(ojpsdata[i].Level2) {
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(ojpsdata[i].Level3)).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
}
}
}
// for idindex, idmark := range list {
// if activity[idindex] {
// injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+idmark).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
// }
// }
}
}
/*
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(metrics.MDCT2viewsTotalRegular)).Call(wasm.ELEMENTS_METHOD_setAttribute, "disabled", "")
injectpoint.Call(wasm.DOCUMENTS_METHOD_getElementById, metrics.IDRequestCriteriaPrefix+string(metrics.MDCT2viewsTotalRegular)).Call(wasm.ELEMENTS_METHOD_removeAttribute, "disabled", "")
*/
}

View File

@ -0,0 +1,626 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
(() => {
// Map multiple JavaScript environments to a single common API,
// preferring web standards over Node.js API.
//
// Environments considered:
// - Browsers
// - Node.js
// - Electron
// - Parcel
// - Webpack
if (typeof global !== "undefined") {
// global already exists
} else if (typeof window !== "undefined") {
window.global = window;
} else if (typeof self !== "undefined") {
self.global = self;
} else {
throw new Error("cannot export Go (neither global, window nor self is defined)");
}
if (!global.require && typeof require !== "undefined") {
global.require = require;
}
if (!global.fs && global.require) {
const fs = require("fs");
if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) {
global.fs = fs;
}
}
const enosys = () => {
const err = new Error("not implemented");
err.code = "ENOSYS";
return err;
};
if (!global.fs) {
let outputBuf = "";
global.fs = {
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
writeSync(fd, buf) {
outputBuf += decoder.decode(buf);
const nl = outputBuf.lastIndexOf("\n");
if (nl != -1) {
console.log(outputBuf.substr(0, nl));
outputBuf = outputBuf.substr(nl + 1);
}
return buf.length;
},
write(fd, buf, offset, length, position, callback) {
if (offset !== 0 || length !== buf.length || position !== null) {
callback(enosys());
return;
}
const n = this.writeSync(fd, buf);
callback(null, n);
},
chmod(path, mode, callback) { callback(enosys()); },
chown(path, uid, gid, callback) { callback(enosys()); },
close(fd, callback) { callback(enosys()); },
fchmod(fd, mode, callback) { callback(enosys()); },
fchown(fd, uid, gid, callback) { callback(enosys()); },
fstat(fd, callback) { callback(enosys()); },
fsync(fd, callback) { callback(null); },
ftruncate(fd, length, callback) { callback(enosys()); },
lchown(path, uid, gid, callback) { callback(enosys()); },
link(path, link, callback) { callback(enosys()); },
lstat(path, callback) { callback(enosys()); },
mkdir(path, perm, callback) { callback(enosys()); },
open(path, flags, mode, callback) { callback(enosys()); },
read(fd, buffer, offset, length, position, callback) { callback(enosys()); },
readdir(path, callback) { callback(enosys()); },
readlink(path, callback) { callback(enosys()); },
rename(from, to, callback) { callback(enosys()); },
rmdir(path, callback) { callback(enosys()); },
stat(path, callback) { callback(enosys()); },
symlink(path, link, callback) { callback(enosys()); },
truncate(path, length, callback) { callback(enosys()); },
unlink(path, callback) { callback(enosys()); },
utimes(path, atime, mtime, callback) { callback(enosys()); },
};
}
if (!global.process) {
global.process = {
getuid() { return -1; },
getgid() { return -1; },
geteuid() { return -1; },
getegid() { return -1; },
getgroups() { throw enosys(); },
pid: -1,
ppid: -1,
umask() { throw enosys(); },
cwd() { throw enosys(); },
chdir() { throw enosys(); },
}
}
if (!global.crypto && global.require) {
const nodeCrypto = require("crypto");
global.crypto = {
getRandomValues(b) {
nodeCrypto.randomFillSync(b);
},
};
}
if (!global.crypto) {
throw new Error("global.crypto is not available, polyfill required (getRandomValues only)");
}
if (!global.performance) {
global.performance = {
now() {
const [sec, nsec] = process.hrtime();
return sec * 1000 + nsec / 1000000;
},
};
}
if (!global.TextEncoder && global.require) {
global.TextEncoder = require("util").TextEncoder;
}
if (!global.TextEncoder) {
throw new Error("global.TextEncoder is not available, polyfill required");
}
if (!global.TextDecoder && global.require) {
global.TextDecoder = require("util").TextDecoder;
}
if (!global.TextDecoder) {
throw new Error("global.TextDecoder is not available, polyfill required");
}
// End of polyfills for common API.
const encoder = new TextEncoder("utf-8");
const decoder = new TextDecoder("utf-8");
global.Go = class {
constructor() {
this.argv = ["js"];
this.env = {};
this.exit = (code) => {
if (code !== 0) {
console.warn("exit code:", code);
}
};
this._exitPromise = new Promise((resolve) => {
this._resolveExitPromise = resolve;
});
this._pendingEvent = null;
this._scheduledTimeouts = new Map();
this._nextCallbackTimeoutID = 1;
const setInt64 = (addr, v) => {
this.mem.setUint32(addr + 0, v, true);
this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);
}
const getInt64 = (addr) => {
const low = this.mem.getUint32(addr + 0, true);
const high = this.mem.getInt32(addr + 4, true);
return low + high * 4294967296;
}
const loadValue = (addr) => {
const f = this.mem.getFloat64(addr, true);
if (f === 0) {
return undefined;
}
if (!isNaN(f)) {
return f;
}
const id = this.mem.getUint32(addr, true);
return this._values[id];
}
const storeValue = (addr, v) => {
const nanHead = 0x7FF80000;
if (typeof v === "number" && v !== 0) {
if (isNaN(v)) {
this.mem.setUint32(addr + 4, nanHead, true);
this.mem.setUint32(addr, 0, true);
return;
}
this.mem.setFloat64(addr, v, true);
return;
}
if (v === undefined) {
this.mem.setFloat64(addr, 0, true);
return;
}
let id = this._ids.get(v);
if (id === undefined) {
id = this._idPool.pop();
if (id === undefined) {
id = this._values.length;
}
this._values[id] = v;
this._goRefCounts[id] = 0;
this._ids.set(v, id);
}
this._goRefCounts[id]++;
let typeFlag = 0;
switch (typeof v) {
case "object":
if (v !== null) {
typeFlag = 1;
}
break;
case "string":
typeFlag = 2;
break;
case "symbol":
typeFlag = 3;
break;
case "function":
typeFlag = 4;
break;
}
this.mem.setUint32(addr + 4, nanHead | typeFlag, true);
this.mem.setUint32(addr, id, true);
}
const loadSlice = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
return new Uint8Array(this._inst.exports.mem.buffer, array, len);
}
const loadSliceOfValues = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
const a = new Array(len);
for (let i = 0; i < len; i++) {
a[i] = loadValue(array + i * 8);
}
return a;
}
const loadString = (addr) => {
const saddr = getInt64(addr + 0);
const len = getInt64(addr + 8);
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
}
const timeOrigin = Date.now() - performance.now();
this.importObject = {
go: {
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported
// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).
// This changes the SP, thus we have to update the SP used by the imported function.
// func wasmExit(code int32)
"runtime.wasmExit": (sp) => {
sp >>>= 0;
const code = this.mem.getInt32(sp + 8, true);
this.exited = true;
delete this._inst;
delete this._values;
delete this._goRefCounts;
delete this._ids;
delete this._idPool;
this.exit(code);
},
// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)
"runtime.wasmWrite": (sp) => {
sp >>>= 0;
const fd = getInt64(sp + 8);
const p = getInt64(sp + 16);
const n = this.mem.getInt32(sp + 24, true);
fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));
},
// func resetMemoryDataView()
"runtime.resetMemoryDataView": (sp) => {
sp >>>= 0;
this.mem = new DataView(this._inst.exports.mem.buffer);
},
// func nanotime1() int64
"runtime.nanotime1": (sp) => {
sp >>>= 0;
setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);
},
// func walltime1() (sec int64, nsec int32)
"runtime.walltime1": (sp) => {
sp >>>= 0;
const msec = (new Date).getTime();
setInt64(sp + 8, msec / 1000);
this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);
},
// func scheduleTimeoutEvent(delay int64) int32
"runtime.scheduleTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this._nextCallbackTimeoutID;
this._nextCallbackTimeoutID++;
this._scheduledTimeouts.set(id, setTimeout(
() => {
this._resume();
while (this._scheduledTimeouts.has(id)) {
// for some reason Go failed to register the timeout event, log and try again
// (temporary workaround for https://github.com/golang/go/issues/28975)
console.warn("scheduleTimeoutEvent: missed timeout event");
this._resume();
}
},
getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early
));
this.mem.setInt32(sp + 16, id, true);
},
// func clearTimeoutEvent(id int32)
"runtime.clearTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this.mem.getInt32(sp + 8, true);
clearTimeout(this._scheduledTimeouts.get(id));
this._scheduledTimeouts.delete(id);
},
// func getRandomData(r []byte)
"runtime.getRandomData": (sp) => {
sp >>>= 0;
crypto.getRandomValues(loadSlice(sp + 8));
},
// func finalizeRef(v ref)
"syscall/js.finalizeRef": (sp) => {
sp >>>= 0;
const id = this.mem.getUint32(sp + 8, true);
this._goRefCounts[id]--;
if (this._goRefCounts[id] === 0) {
const v = this._values[id];
this._values[id] = null;
this._ids.delete(v);
this._idPool.push(id);
}
},
// func stringVal(value string) ref
"syscall/js.stringVal": (sp) => {
sp >>>= 0;
storeValue(sp + 24, loadString(sp + 8));
},
// func valueGet(v ref, p string) ref
"syscall/js.valueGet": (sp) => {
sp >>>= 0;
const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 32, result);
},
// func valueSet(v ref, p string, x ref)
"syscall/js.valueSet": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));
},
// func valueDelete(v ref, p string)
"syscall/js.valueDelete": (sp) => {
sp >>>= 0;
Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));
},
// func valueIndex(v ref, i int) ref
"syscall/js.valueIndex": (sp) => {
sp >>>= 0;
storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));
},
// valueSetIndex(v ref, i int, x ref)
"syscall/js.valueSetIndex": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));
},
// func valueCall(v ref, m string, args []ref) (ref, bool)
"syscall/js.valueCall": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const m = Reflect.get(v, loadString(sp + 16));
const args = loadSliceOfValues(sp + 32);
const result = Reflect.apply(m, v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 56, result);
this.mem.setUint8(sp + 64, 1);
} catch (err) {
storeValue(sp + 56, err);
this.mem.setUint8(sp + 64, 0);
}
},
// func valueInvoke(v ref, args []ref) (ref, bool)
"syscall/js.valueInvoke": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.apply(v, undefined, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueNew(v ref, args []ref) (ref, bool)
"syscall/js.valueNew": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.construct(v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueLength(v ref) int
"syscall/js.valueLength": (sp) => {
sp >>>= 0;
setInt64(sp + 16, parseInt(loadValue(sp + 8).length));
},
// valuePrepareString(v ref) (ref, int)
"syscall/js.valuePrepareString": (sp) => {
sp >>>= 0;
const str = encoder.encode(String(loadValue(sp + 8)));
storeValue(sp + 16, str);
setInt64(sp + 24, str.length);
},
// valueLoadString(v ref, b []byte)
"syscall/js.valueLoadString": (sp) => {
sp >>>= 0;
const str = loadValue(sp + 8);
loadSlice(sp + 16).set(str);
},
// func valueInstanceOf(v ref, t ref) bool
"syscall/js.valueInstanceOf": (sp) => {
sp >>>= 0;
this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);
},
// func copyBytesToGo(dst []byte, src ref) (int, bool)
"syscall/js.copyBytesToGo": (sp) => {
sp >>>= 0;
const dst = loadSlice(sp + 8);
const src = loadValue(sp + 32);
if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
// func copyBytesToJS(dst ref, src []byte) (int, bool)
"syscall/js.copyBytesToJS": (sp) => {
sp >>>= 0;
const dst = loadValue(sp + 8);
const src = loadSlice(sp + 16);
if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
"debug": (value) => {
console.log(value);
},
}
};
}
async run(instance) {
if (!(instance instanceof WebAssembly.Instance)) {
throw new Error("Go.run: WebAssembly.Instance expected");
}
this._inst = instance;
this.mem = new DataView(this._inst.exports.mem.buffer);
this._values = [ // JS values that Go currently has references to, indexed by reference id
NaN,
0,
null,
true,
false,
global,
this,
];
this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id
this._ids = new Map([ // mapping from JS values to reference ids
[0, 1],
[null, 2],
[true, 3],
[false, 4],
[global, 5],
[this, 6],
]);
this._idPool = []; // unused ids that have been garbage collected
this.exited = false; // whether the Go program has exited
// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.
let offset = 4096;
const strPtr = (str) => {
const ptr = offset;
const bytes = encoder.encode(str + "\0");
new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);
offset += bytes.length;
if (offset % 8 !== 0) {
offset += 8 - (offset % 8);
}
return ptr;
};
const argc = this.argv.length;
const argvPtrs = [];
this.argv.forEach((arg) => {
argvPtrs.push(strPtr(arg));
});
argvPtrs.push(0);
const keys = Object.keys(this.env).sort();
keys.forEach((key) => {
argvPtrs.push(strPtr(`${key}=${this.env[key]}`));
});
argvPtrs.push(0);
const argv = offset;
argvPtrs.forEach((ptr) => {
this.mem.setUint32(offset, ptr, true);
this.mem.setUint32(offset + 4, 0, true);
offset += 8;
});
this._inst.exports.run(argc, argv);
if (this.exited) {
this._resolveExitPromise();
}
await this._exitPromise;
}
_resume() {
if (this.exited) {
throw new Error("Go program has already exited");
}
this._inst.exports.resume();
if (this.exited) {
this._resolveExitPromise();
}
}
_makeFuncWrapper(id) {
const go = this;
return function () {
const event = { id: id, this: this, args: arguments };
go._pendingEvent = event;
go._resume();
return event.result;
};
}
}
if (
typeof module !== "undefined" &&
global.require &&
global.require.main === module &&
global.process &&
global.process.versions &&
!global.process.versions.electron
) {
if (process.argv.length < 3) {
console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
process.exit(1);
}
const go = new Go();
go.argv = process.argv.slice(2);
go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env);
go.exit = process.exit;
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
process.on("exit", (code) => { // Node.js exits if no event handler is pending
if (code === 0 && !go.exited) {
// deadlock, make Go print error and stack traces
go._pendingEvent = { id: 0 };
go._resume();
}
});
return go.run(result.instance);
}).catch((err) => {
console.error(err);
process.exit(1);
});
}
})();

282
goMetrix/goMetrix.go Normal file
View File

@ -0,0 +1,282 @@
package goMetrix
import (
"Toolbox/goDataverseStrict/metrics"
"fmt"
"log"
"net/http"
"sort"
)
const (
addr = "localhost:8008"
dir = ""
//PLATZHALTER = "Þłæŧ←ħæłŧ€¶"
)
func sortMyDingse[dings metrics.MetricsType | metrics.MetricsDataCountType | metrics.SearchType | metrics.ReturnformatType, bums metrics.InputLevel0 | metrics.InputLevel1 | metrics.InputLevel2 | metrics.InputLevel3 | bool](dstring map[dings]bums) (raus []dings) {
var klaus []string
for i, _ := range dstring {
klaus = append(klaus, string(i))
}
sort.Strings(klaus)
return
}
func Handler(w http.ResponseWriter, r *http.Request) {
var a [4]string
for i := int8(0); i <= 3; i++ {
tmp, _ := metrics.FilterStacklist(metrics.OneJumpPoints, i)
for j, v := range tmp {
if i == 3 || (i < 3 && len(v) > 0) {
log.Println("Hallo", j, v, len(v))
}
a[i] += fmt.Sprintf("<span id=\"%s\" %s>", metrics.IDRequestHideDisplayPrefix+string(v), func() string {
if i < 3 && len(v) > 0 {
return ""
} else { // i == 3 Resolve-Format ist vorerst nicht verhandelbar, nur zu DEBUG-Zwecken sichtbar machen.
return "class=\"element-hide\""
}
}())
a[i] += fmt.Sprintf("<input type=\"radio\" id=\"%s\" name=\"form_types_radio\" value=\"%s\" %s/><label for=\"%s\"><b>%s</b></label>",
metrics.IDRequestCriteriaPrefix+string(v),
string(v),
func() string {
if j == 0 && v != "" {
return "checked"
} else {
return ""
}
}(),
metrics.IDRequestCriteriaPrefix+string(v),
string(v))
if i == 2 {
switch v {
default: //Total ist default //case string(metrics.ST1_tota
//a[i] += ""
case string(metrics.ST2tomonth):
a[i] += `<label for="` + metrics.IDRequestTextPrefix + string(metrics.ST2tomonth) + `"> Bis &lt;yyyy-mm&gt; (inklusive)</label>
<input name="form_searches" type="text" size="10" id="` + metrics.IDRequestTextPrefix + string(metrics.ST2tomonth) + `" value="2022-03" onSelect="this.enabled;getElementById('` + metrics.IDRequestTextPrefix + string(metrics.ST1total) + `').checked=false" onchange="checkoneuncheckany(ids,'` + metrics.IDRequestTextPrefix + string(metrics.ST2tomonth) + `')" onmouseover="enableonedisableany(ids, '` + metrics.IDRequestTextPrefix + string(metrics.ST2tomonth) + `')">`
case string(metrics.ST3pastdays):
a[i] += `<label for="` + metrics.IDRequestTextPrefix + string(metrics.ST3pastdays) + `"> Die letzten Tage</label>
<input name="form_searches" type="text" size="10" id="` + metrics.IDRequestTextPrefix + string(metrics.ST3pastdays) + `" value="30" onchange="checkoneuncheckany(ids,'` + metrics.IDRequestTextPrefix + string(metrics.ST3pastdays) + `')" onmouseover="enableonedisableany(ids, '` + metrics.IDRequestTextPrefix + string(metrics.ST3pastdays) + `')">`
case string(metrics.ST4monthly):
a[i] += `<label for="` + metrics.IDRequestTextPrefix + string(metrics.ST4monthly) + `"> &lt;yyyy-mm&gt; bis &lt;yyyy-mm&gt;</label>
<input name="form_searches" type="text" size="25" id="` + metrics.IDRequestTextPrefix + string(metrics.ST4monthly) + `" value="2020-11 bis 2021-08" onchange="checkoneuncheckany(ids,'` + metrics.IDRequestTextPrefix + string(metrics.ST4monthly) + `')" onmouseover="enableonedisableany(ids, '` + metrics.IDRequestTextPrefix + string(metrics.ST4monthly) + `')">
`
case string(metrics.ST5tree):
a[i] += `<label for="` + metrics.IDRequestTextPrefix + string(metrics.ST5tree) + `"></label>
<input name="form_searches" type="text" size="10" id="` + metrics.IDRequestTextPrefix + string(metrics.ST5tree) + `" value="2022-12" onchange="checkoneuncheckany(ids,'` + metrics.IDRequestTextPrefix + string(metrics.ST5tree) + `')" onmouseover="enableonedisableany(ids, '` + metrics.IDRequestTextPrefix + string(metrics.ST5tree) + `')">`
}
}
a[i] += `<br></span>`
}
}
/*
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST1_total)+`">Total</label>
<input name="form_searches" type="checkbox" id="`+metrics.IDRequestTextPrefix+string(metrics.ST1_total)+`" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST1_total)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST1_total)+`')" checked>
*/
/*
//for i1, v1 := range metrics.OneJumpPointSet {
for _, i1 := range sortMyDingse(metrics.OldOneJumpPointSet) {
v1 := metrics.OldOneJumpPointSet[i1]
s1 += fmt.Sprintf("<input type=\"radio\" id=\"input_%s\" name=\"form_types_radio\" value=\"%s\"><label for=\"input_%s\">%s</label><br>", string(i1), string(i1), string(i1), string(i1))
if !done2 {
done2 = true
//for i2, v2 := range v1 {
for _, i2 := range sortMyDingse(v1) {
v2 := v1[i2]
s2 += fmt.Sprintf("<input type=\"radio\" id=\"input_%s\" name=\"form_types_radio\" value=\"%s\" disabled><label for=\"input_%s\">%s</label><br>", string(i2), string(i2), string(i2), string(i2))
if !done3 {
done3 = true
//for i3, v3 := range v2 {
for _, i3 := range sortMyDingse(v2) {
v3 := v2[i3]
s3 += fmt.Sprintf("<input type=\"radio\" id=\"input_%s\" name=\"form_types_radio\" value=\"%s\" disabled><label for=\"input_%s\">%s</label><br>", string(i3), string(i3), string(i3), string(i3))
if !done4 {
done4 = true
//for i4, _ := range v3 {
for _, i4 := range sortMyDingse(v3) {
//v4 := v3[i4]
s4 += fmt.Sprintf("<input type=\"radio\" id=\"input_%s\" name=\"form_types_radio\" value=\"%s\" disabled><label for=\"input_%s\">%s</label><br>", string(i4), string(i4), string(i4), string(i4))
}
}
}
}
}
}
}
*/
fmt.Fprintf(w, `<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>goMetrix</title>
<link rel="stylesheet" href="/css/metrics.css">
<script src="https://golang.org/misc/wasm/wasm_exec.js"></script>
<script>
if (!WebAssembly.instantiateStreaming) {
// polyfill
WebAssembly.instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
}
const go = new Go();
let mod, inst;
WebAssembly.instantiateStreaming(fetch("/wasm/app.wasm"), go.importObject)
.then((result) => {
go.run(result.instance);
})
.catch((err) => {
console.error(err);
});
</script>
<script>
const ids = new Array(
"`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`",
"`+metrics.IDRequestTextPrefix+string(metrics.ST2tomonth)+`",
"`+metrics.IDRequestTextPrefix+string(metrics.ST3pastdays)+`",
"`+metrics.IDRequestTextPrefix+string(metrics.ST4monthly)+`",
"`+metrics.IDRequestTextPrefix+string(metrics.ST5tree)+`"
);
function pseudoSubmit2(){
alert("läuft");
}
function enableonedisableany(ids, id) {
for (let i = 0; i < ids.length; i++){
//alert(ids[i]);
//document.getElementById(ids[i]).checked = false;
document.getElementById(ids[i]).disabled = true;
}
document.getElementById(id).disabled = false;
}
function checkoneuncheckany(ids,id){
for (let i = 0; i < ids.length; i++){
document.getElementById(ids[i]).checked = false;
}
document.getElementById(id).checked = true;
}
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<div id="formarea">
<p>
<table><tr>
<td valign="top" width="20%"><form id="form_metrictype">`+a[0]+`</form></td>
<td valign="top" width="20%"><form id="form_metricsdatacount">`+a[1]+`</form></td>
<td valign="top" width="50%"><form id="form_searchtype">`+a[2]+`</form></td>
<td valign="top" width="5%"><form id="form_returnformat">`+a[3]+`</form></td>
<td valign="top" width="5%"><input type="submit" onclick="pseudoSubmit2();" id="`+metrics.IDFormSubmit+`" value="Ok" /></td>
</td></tr></table>
</p>
<!--<p>
<form id="form_results">
<input type="hidden" name="form_results_radio" value="`+string(metrics.RT1json)+`" checked>
<input type="radio" id="`+metrics.IDRequestTextPrefix+string(metrics.RT1json)+`" name="form_results_radio" value="`+string(metrics.RT1json)+`" checked>
<label for="`+metrics.IDRequestTextPrefix+string(metrics.RT1json)+`">`+string(metrics.RT1json)+`</label><br>
<input type="radio" id="`+metrics.IDRequestTextPrefix+string(metrics.RT2csv)+`" name="form_results_radio" value="`+string(metrics.RT2csv)+`">
<label for="`+metrics.IDRequestTextPrefix+string(metrics.RT2csv)+`">`+string(metrics.RT2csv)+`</label><br>
</form>
</p>-->
<!--<p>
<form id="form_searches">
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`">Total</label>
<input name="form_searches" type="checkbox" id="`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`')" checked>
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST2tomonth)+`">Bis &lt;yyyy-mm&gt; (inklusive)</label>
<input name="form_searches" type="text" size="10" id="`+metrics.IDRequestTextPrefix+string(metrics.ST2tomonth)+`" value="2022-03" onSelect="this.enabled;getElementById('`+metrics.IDRequestTextPrefix+string(metrics.ST1total)+`').checked=false" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST2tomonth)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST2tomonth)+`')">
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST3pastdays)+`">Die letzten Tage</label>
<input name="form_searches" type="text" size="10" id="`+metrics.IDRequestTextPrefix+string(metrics.ST3pastdays)+`" value="30" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST3pastdays)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST3pastdays)+`')">
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST4monthly)+`">&lt;yyyy-mm&gt; bis &lt;yyyy-mm&gt;</label>
<input name="form_searches" type="text" size="25" id="`+metrics.IDRequestTextPrefix+string(metrics.ST4monthly)+`" value="2020-11 bis 2021-08" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST4monthly)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST4monthly)+`')">
<label for="`+metrics.IDRequestTextPrefix+string(metrics.ST5tree)+`">Tree</label>
<input name="form_searches" type="text" size="10" id="`+metrics.IDRequestTextPrefix+string(metrics.ST5tree)+`" value="2022-12" onchange="checkoneuncheckany(ids,'`+metrics.IDRequestTextPrefix+string(metrics.ST5tree)+`')" onmouseover="enableonedisableany(ids, '`+metrics.IDRequestTextPrefix+string(metrics.ST5tree)+`')">
</form>
</p>-->
</div>
<!--<div id="testarea"></div>-->
<div id="injectarea">&#128039;<!--&#x1F427;--></div>
<div id="chartarea"></div>
<script id="scriptarea"></script>
</body>
</html>`)
/*
DEBUG:
fmt.Fprintf(w, "😱<br>")
md, me := metrics.MetricsTotal("http://localhost:8080", "f6933c5d-8e97-4e7a-b21a-c57447cca421", metrics.RT1json, metrics.MT1dataverses)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsTotal("http://localhost:8080", "f6933c5d-8e97-4e7a-b21a-c57447cca421", metrics.RT2csv, metrics.MT4downloads)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsTotal("http://localhost:8080", "f6933c5d-8e97-4e7a-b21a-c57447cca421", metrics.RT1json, metrics.MT2datasets)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsTotal("http://localhost:8080", "f6933c5d-8e97-4e7a-b21a-c57447cca421", metrics.RT2csv, metrics.MT3files)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
ts, _ := time.Parse("2006-01", "2021-06")
md, me = metrics.MetricsToMonth("http://localhost:8080", "", metrics.RT2csv, metrics.MT2datasets, ts)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsToMonth("http://localhost:8080", "", metrics.RT2csv, metrics.MT4downloads, ts)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsPastDays("http://localhost:8080", "", metrics.RT2csv, metrics.MT2datasets, 30)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsMonthly("http://localhost:8080", "", metrics.RT2csv, metrics.MT4downloads)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsMonthly("http://localhost:8080", "", metrics.RT1json, metrics.MT4downloads)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsReallyMonthly("http://localhost:8080", "", metrics.RT1json, metrics.MT4downloads)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
//fmt.Println(metrics.ListUsers("http://localhost:8080", "f6933c5d-8e97-4e7a-b21a-c57447cca421", true))
ts, _ = time.Parse("2006-01", "2020-12")
md, me = metrics.MetricsTree("http://localhost:8080", "", metrics.RT1json, ts)
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
md, me = metrics.MetricsTree("http://localhost:8080", "", metrics.RT1json, time.Time{})
fmt.Fprintf(w, "%s<br> %s<br><br>", me, md)
//fmt.Fprintf(w, "%v", time.Now().Format("2006-02"))
*/
}

1466
main.go Normal file

File diff suppressed because it is too large Load Diff

58
postgres/postgres.go Normal file
View File

@ -0,0 +1,58 @@
/**
= Creative Commons Lizenzvertrag =
Diese Software ist von der archium GmbH, Gera ist lizenziert unter einer Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International Lizenz. (http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de)
Individuelle über diese Lizenz hinausgehende Berechtigungen können Sie unter https://archium.org erhalten.
= Creative Commons License =
Software by archium GmbH, Gera is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Individual permissions beyond the scope of this license may be available at https://archium.org.
**/
package postgres
import (
"fmt"
// "log"
// "strings"
def "Toolbox/defaults"
sql "database/sql"
)
var expdb *sql.DB
// #############################################################################
// get - sql connection
// #############################################################################
func GetConnection() (*sql.DB, error) {
psqlInfo := fmt.Sprintf(def.DEF_coninfo, def.DEF_dbhost, def.DEF_dbport, def.DEF_dbuser, def.DEF_dbpassword, def.DEF_dbname)
conn, err := sql.Open("postgres", psqlInfo)
//log.Println("GetConnection:", psqlInfo, conn, err)
if err != nil {
def.LogError("GetConnection()", err)
return nil, err
}
return conn, nil
}
// #############################################################################
// close - sql connection
// #############################################################################
func CloseConnection(_conn *sql.DB) error {
var err error = nil
if _conn != nil {
err = _conn.Close()
}
return err
}
// #############################################################################
// ping - sql connection
// #############################################################################
func PingConnection(_conn *sql.DB) error {
var err error = nil
if _conn != nil {
err = _conn.Ping()
}
return err
}

Binary file not shown.

BIN
static/Toolbox Executable file

Binary file not shown.

99
static/css/cloud.css Normal file
View File

@ -0,0 +1,99 @@
/* cloud style */
html,body {
height:100%;
overflow:hidden;
margin:0;
}
tr.dialog-line td{
color:#dddddd;
font-size:110%;
font-weight:500;
height:5px;
padding: 0px 0px 5px 10px;
margin: 5px 0px 10px 0px;
border-bottom: 1px solid #dddddd
}
.extitem-caption{
font-weight:bold;
padding-left:5px;
}
.extitem-unit,
.extitem-value{
margin:0;
padding: 2px 5px 2px 2px;
font-size:18px;
}
.extitem-value{
text-align:right;
width:1%;
font-size:18px;
}
.extitem-combo{
text-align:left;
/* width: 100%; */
width: 80px;
font-size:18px;
}
.extitem-number{
text-align:right;
width: 100%;
font-size:18px;
}
.extitem-text{
text-align:left;
width: 100%;
}
.mod-tb-btn{
min-width: 40px;
max-width: 4vW;
}
.mod-tb-btn-hide{
display: none;
}
.mod-tb-btn-show{
display: inline-block;
}
.mod-tb-btn-disable{
display: none;
}
.mod-tb-btn-enable{
display: inline-block;
}
.tree-file,
.tree-folder,
.tree-folder-open{
background-image: none;
}
.icon-package{
color: #404080;
}
.icon-dataverse{
color: #c55b28;
}
.icon-dataset{
color: #337ab7;
}
.icon-astro,
.icon-audio,
.icon-code,
.icon-document,
.icon-image,
.icon-file,
.icon-network,
.icon-other,
.icon-tabular,
.icon-unlock,
.icon-video
{
color: #444;
}
.icon-package
{
color: #000;
}
/* end pps-cloud style */

347
static/css/codemirror.css Normal file
View File

@ -0,0 +1,347 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0 !important;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@-moz-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@-webkit-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror-overwrite .CodeMirror-cursor {}
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-rulers {
position: absolute;
left: 0; right: 0; top: -50px; bottom: -20px;
overflow: hidden;
}
.CodeMirror-ruler {
border-left: 1px solid #ccc;
top: 0; bottom: 0;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
.CodeMirror-composing { border-bottom: 2px solid; }
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
min-height: 100%;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -30px;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0; bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-widget {}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-cursor {
position: absolute;
pointer-events: none;
}
.CodeMirror-measure pre { position: static; }
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }

68
static/css/fontcustom.css Normal file
View File

@ -0,0 +1,68 @@
/*
Icon Font: fontcustom
*/
@font-face {
font-family: "fontcustom";
src: url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.eot");
src: url("/css/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.eot?#iefix") format("embedded-opentype"),
url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.woff2") format("woff2"),
url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.woff") format("woff"),
url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.ttf") format("truetype"),
url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.svg#fontcustom") format("svg");
font-weight: normal;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "fontcustom";
src: url("/css/resources/fontcustom/fontcustom_47254e4da4fa5ad5e2bb7c085027ce43.svg#fontcustom") format("svg");
}
}
[data-icon]::before { content: attr(data-icon); }
[data-icon]::before,
.icon-astro::before,
.icon-audio::before,
.icon-code::before,
.icon-dataset::before,
.icon-dataverse::before,
.icon-document::before,
.icon-file::before,
.icon-geodata::before,
.icon-image::before,
.icon-network::before,
.icon-other::before,
.icon-package::before,
.icon-tabular::before,
.icon-unlock::before,
.icon-video::before {
display: inline-block;
font-family: "fontcustom";
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: 1;
text-decoration: inherit;
text-rendering: optimizeLegibility;
text-transform: none;
-webkit-font-smoothing: antialiased;
}
.icon-astro::before { content: "\f104"; }
.icon-audio::before { content: "\f105"; }
.icon-code::before { content: "\f10b"; }
.icon-dataset::before { content: "\f102"; }
.icon-dataverse::before { content: "\f100"; }
.icon-document::before { content: "\f106"; }
.icon-file::before { content: "\f10a"; }
.icon-geodata::before { content: "\f107"; }
.icon-image::before { content: "\f103"; }
.icon-network::before { content: "\f10c"; }
.icon-other::before { content: "\f10d"; }
.icon-package::before { content: "\f10f"; }
.icon-tabular::before { content: "\f108"; }
.icon-unlock::before { content: "\f10e"; }
.icon-video::before { content: "\f109"; }

3
static/css/metrics.css Normal file
View File

@ -0,0 +1,3 @@
.element-hide{
display: none;
}

269
static/css/module.css Normal file
View File

@ -0,0 +1,269 @@
body{
/* text-size-adjust:auto; */
-moz-text-size-adjust:auto;
-webkit-text-size-adjust:auto;
-ms-text-size-adjust:auto;
}
label.textbox-label-before{
vertical-align:middle;
font-size:90%;
}
tr.wrongcontent{
display:none;
}
td.wrongcontent{
visibility:hidden;
}
a.tooltip {
position:relative;
text-decoration:none;
}
a.tooltip:after {
content:attr(data-tooltip);
position:absolute;
bottom:130%;
left:20%;
background:#ffcb66;
padding:5px 15px;
color:black;
-webkit-border-radius:10px;
-moz-border-radius :10px;
border-radius :10px;
white-space:nowrap;
opacity:0;
/* At time of this creation, only Fx4 doing pseduo transitions */
-webkit-transition:all 0.4s ease;
-moz-transition :all 0.4s ease;
}
a.tooltip:before {
content:"";
position:absolute;
width:0;
height:0;
border-top:20px solid #ffcb66;
border-left:20px solid transparent;
border-right:20px solid transparent;
/* At time of this creation, only Fx4 doing pseduo transitions */
-webkit-transition:all 0.4s ease;
-moz-transition :all 0.4s ease;
opacity:0;
left:30%;
bottom:90%;
}
a.tooltip:hover:after {
bottom:100%;
}
a.tooltip:hover:before {
bottom:70%;
}
a.tooltip:hover:after, a:hover:before {
opacity:1;
}
.svgdelivery1, .svgstore1, .svgmale1, .svgfemale1{
fill:white;
}.svgdelivery1blur, .svgstore1blur, .svgmale1blur, .svgfemale1blur{
fill:black;
}
.svgsplit{
fill:#4040FF; !important;
stroke-width:0; !important
}
.footerstatus {
float:left;
/* font-family:Helvetica,Tahoma,Arial,sans-serif; */
font-size:130%;
margin-left:10px;
}
.footerstatuserror {
color:#FFFFFF;
background-color:#FF0000;
}
fieldset {
border:none;
/* float:left; */
height:auto;
width:auto;
}
.toollabel{
display:block;
margin:auto;
margin-left:-5px;
margin-top:-6px;
margin-bottom:-7px;
font-size:1.3vh;
display:none;
}
table caption{
background:rgba(222, 128, 51, 0.75);
color:#444;
border:1px solid #d4a375;
padding:0.25%;
padding-left:0.5%;
text-align:left;
font-size:0.8em;
}
#tablebox {
width:100%;
height:100%;
margin:0px;
clear:both;
border-collapse:collapse;
border-color:black;
table-layout:fixed;
/* font-family:Arial,Helvetica,Tahoma,sans-serif; */
text-shadow:1px 1px 10px #000, 1px 1px 5px #000;
white-space:nowrap;
border:1px solid transparent;
}
#table_shelflist {
/* width:100%; */
margin-top:5px;
table-layout:fixed;
white-space:nowrap;
border-collapse:collapse;
}
#table_boxlist {
/* width:100%; */
table-layout:fixed;
/* font-family:Arial,Helvetica,Tahoma,sans-serif; */
white-space:nowrap;
border-collapse:collapse;
}
#table_place{
table-layout:fixed;
width:100%;
height:100%;
margin:auto;
border:0px solid rgb(160,160,160);
white-space:nowrap;
/* font-family:Arial,Helvetica,Tahoma,sans-serif; */
}
tr.noborder{
font-size:110%;
}
td.noborder{
padding:0px;
}
td.shelfplace{
width:10vw;
height:9vh;
margin:1px;
background:transparent;
vertical-align:middle;
}
td.droppable{
/* border:1px solid #FFF; */
}
td.noshelfplace{
width:10vw;
height:9vh;
margin:1px;
/* border:4px solid transparent; */
}
div.contentpanel{
width:auto;
padding:0.3%;
margin:0.5%;
border:1px solid #d4a375;
}
div.contentscroll{
width:auto;
overflow:auto;
}
div.contentcaption{
width:auto;
height:20px;
background:rgba(222, 128, 51, 0.75);
color:#444;
border:1px solid #d4a375;
padding:0.25%;
font-size:1em;
overflow:auto;
}
div.content{
border:0px;
font-size:0.6em;
}
div.dragbox{
/* width:96%; */
height:100%;
border:4px solid transparent;
margin:auto;
}
/* Nur Firefox */
@-moz-document url-prefix() {
div.dragbox{
width:95%;
height:100%;
}
}
div.nodragbox{
width:96%;
height:100%;
/* border:2px solid #F0F0F0 */
border:2px solid inherit;
/* margin:auto; */
}
tspan.place{
text-align:left;
font-size:1.5vh;
position:relative;
left:5%;
width:25%;
float:left;
}
tspan.placeshelf{
width:95%;
text-align:center;
opacity:0.5;
}
tspan.number{
width:100%;
text-align:center;
font-size:2.5vh;
position:relative;
float:left;
}
tspan.weight{
text-align:right;
font-size:1.5vh;
position:relative;
left:8%;
width:90%;
float:left;
}
div.sl{
border:4px solid #f00;
}
table.legend{
width:100%;
height:auto;
border-spacing:0px;
}
td.legend{
width:10vw;
font-size:1.5vh;
text-align:center;
text-shadow:1px 1px 2px #444;
}
/************************************************/
.dontmove{
opacity: 0.6;
}
.deliverybox{
/* display:inline-block; */
text-decoration:none;
border:4px solid transparent;
}
.warehousebox{
/* display:inline-block; */
text-decoration:none;
/* padding-right:1em; */
}

139
static/css/prism.css Normal file
View File

@ -0,0 +1,139 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+sql */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

View File

@ -0,0 +1,235 @@
html {BORDER-STYLE:_none; HEIGHT:100%;}
body {MARGIN: 5px; FONT-COLOR: black; FONT-FAMILY: Arial; HEIGHT:100%;}
@media print{
body {ZOOM: 87%; BACKGROUND-COLOR: #FFFFFF;}
#pagebreak {PAGE-BREAK-AFTER: always;}
/* popup-menu */
#menu {DISPLAY: none; FILTER:blendTrans(Duration=0.3);}
input {DISPLAY: none;}
#menucaption {DISPLAY: none;}
#menuitems {DISPLAY: none;}
}
@media screen{
body {ZOOM: 120%; BACKGROUND-COLOR: #ECE9D8;}
#pagebreak {DISPLAY: none;}
/* popup-menu */
#menu,
.submenu {BACKGROUND-COLOR: buttonface; POSITION: absolute; WIDTH: 180px; BORDER-STYLE: outset; BORDER-WIDTH: 2px; Z-INDEX: 200; VISIBILITY: hidden; FILTER:blendTrans(Duration=0.3); FONT-SIZE: 70%;}
input {CURSOR: hand;}
#menucaption {BACKGROUND-COLOR: blue; COLOR: white; TEXT-ALIGN:center;}
#menuitems {PADDING: 5px;}
#menuitemcaption {WIDTH: 79%;}
#menuitemsub {WIDTH: 6%; POSITION: relative; TOP:-3px; CURSOR: hand;}
}
#reporthead {WIDTH: 800px; HEIGHT: 35px; BACKGROUND-COLOR: white; BORDER-BOTTOM: 1px solid black; FONT-SIZE: 100%;}
#recipehead, #orderhead {WIDTH: 800px; BACKGROUND-COLOR: silver; FONT-SIZE: 70%;}
#headcaption {FONT-WEIGHT: bolder; TEXT-DECORATION: underline; CLEAR:both;}
#headline,
#recipeheadline,
#orderheadline,
#runprogsummaryline {LINE-HEIGHT: 90%;}
#headitem,
#recipeheaditem {FLOAT: left; WIDTH: 33%;}
#headitemcaption,
#recipeheaditemcaption {FLOAT: left; WIDTH: 40%;}
#headitemvalue,
#recipeheaditemvalue {FLOAT: left; WIDTH: 40%;}
#headitemunit,
#recipeheaditemunit {WIDTH: 20%;}
#steps {WIDTH: 800px; BORDER-TOP: 1px solid black; BORDER-BOTTOM: 1px solid black; BACKGROUND-COLOR:white;}
#step {CLEAR: both; BORDER-TOP: 1px solid silver; OVERFLOW:hidden;}
#stepno {FLOAT: left; WIDTH: 4%; PADDING-RIGHT: 2px; CLEAR: both; TEXT-ALIGN: right; FONT-WEIGHT:bold;}
#stepsubno {FLOAT: left; WIDTH: 2%; FONT-SIZE: 60%}
.stepjump {COLOR:yellow; BACKGROUND-COLOR:blue;}
#time {FLOAT: left; WIDTH: 10%; LETTER-SPACING: 0px; WORD-SPACING: 0px; FONT: 53%; OVERFLOW: visible;}
#limitsoll,
#timesoll {FLOAT: left; WIDTH: 49%; OVERFLOW: hidden; COLOR:blue;}
#limitist,
#timeist {FLOAT: left; WIDTH: 49%; OVERFLOW: hidden; COLOR:green; FONT: italic;}
#werte {WIDTH: 100%; FONT: 70%; OVERFLOW: hidden; LINE-HEIGHT:90%}
#value_caption {FLOAT: left; WIDTH: 30%; FONT-WEIGHT: _bolder; }
#value_recipe,
#value_default,
#value_setvalue,
#value_current {FLOAT: left; WIDTH: 10%; TEXT-ALIGN:right; MARGIN-RIGHT:1%;}
#unit_recipe,
#unit_default,
#unit_setvalue,
#unit_current {FLOAT: left; WIDTH: 5%; OVERFLOW:hidden;}
#value_recipe,
#unit_recipe {COLOR:blue;}
#value_default,
#unit_default {COLOR:gray;}
#value_setvalue,
#unit_setvalue {}
#value_current,
#unit_current {COLOR:green; FONT: italic;}
#steptype016w1i,#steptype017w1i,#steptype018w1i,
#steptype019w1i,#steptype020w1i,#steptype021w1i,#steptype022w1i,#steptype023w1i,
#steptype024w1i,#steptype027w1i,#steptype029w1i,#steptype030w1i,#steptype031w1i,
#steptype032w1i,#steptype033w1i,#steptype050w1i,#steptype051w1i,
#steptype016w2i,#steptype017w2i,#steptype018w2i,
#steptype019w2i,#steptype020w2i,#steptype021w2i,#steptype022w2i,#steptype023w2i,
#steptype024w2i,#steptype027w2i,#steptype029w2i,#steptype030w2i,#steptype031w2i,
#steptype032w2i,#steptype033w2i,#steptype050w2i,#steptype051w2i,
#steptype016w3i,#steptype017w3i,#steptype018w3i,
#steptype019w3i,#steptype020w3i,#steptype021w3i,#steptype022w3i,#steptype023w3i,
#steptype024w3i,#steptype027w3i,#steptype029w3i,#steptype030w3i,#steptype031w3i,
#steptype032w3i,#steptype033w3i,#steptype050w3i,#steptype051w3i,
#steptype016w4i,#steptype017w4i,#steptype018w4i,
#steptype019w4i,#steptype020w4i,#steptype021w4i,#steptype022w4i,#steptype023w4i,
#steptype024w4i,#steptype027w4i,#steptype029w4i,#steptype030w4i,#steptype031w4i,
#steptype032w4i,#steptype033w4i,#steptype050w4i,#steptype051w4i,
#steptype016w5i,#steptype017w5i,#steptype018w5i,
#steptype019w5i,#steptype020w5i,#steptype021w5i,#steptype022w5i,#steptype023w5i,
#steptype024w5i,#steptype027w5i,#steptype029w5i,#steptype030w5i,#steptype031w5i,
#steptype032w5i,#steptype033w5i,#steptype050w5i,#steptype051w5i,
#steptype016w6i,#steptype017w6i,#steptype018w6i,
#steptype019w6i,#steptype020w6i,#steptype021w6i,#steptype022w6i,#steptype023w6i,
#steptype024w6i,#steptype027w6i,#steptype029w6i,#steptype030w6i,#steptype031w6i,
#steptype032w6i,#steptype033w6i,#steptype050w6i,#steptype051w6i,
{DISPLAY:none; FLOAT: left; WIDTH: 21%; TEXT-ALIGN: right; FONT: italic 70%; COLOR: blue; OVERFLOW: hidden}
#steptype016w1s,#steptype017w1s,#steptype018w1s,
#steptype019w1s,#steptype020w1s,#steptype021w1s,#steptype022w1s,#steptype023w1s,
#steptype024w1s,#steptype027w1s,#steptype029w1s,#steptype030w1s,#steptype031w1s,
#steptype032w1s,#steptype033w1s,#steptype050w1s,#steptype051w1s,
#steptype016w2s,#steptype017w2s,#steptype018w2s,
#steptype019w2s,#steptype020w2s,#steptype021w2s,#steptype022w2s,#steptype023w2s,
#steptype024w2s,#steptype027w2s,#steptype029w2s,#steptype030w2s,#steptype031w2s,
#steptype032w2s,#steptype033w2s,#steptype050w2s,#steptype051w2s,
#steptype016w3s,#steptype017w3s,#steptype018w3s,
#steptype019w3s,#steptype020w3s,#steptype021w3s,#steptype022w3s,#steptype023w3s,
#steptype024w3s,#steptype027w3s,#steptype029w3s,#steptype030w3s,#steptype031w3s,
#steptype032w3s,#steptype033w3s,#steptype050w3s,#steptype051w3s,
#steptype016w4s,#steptype017w4s,#steptype018w4s,
#steptype019w4s,#steptype020w4s,#steptype021w4s,#steptype022w4s,#steptype023w4s,
#steptype024w4s,#steptype027w4s,#steptype029w4s,#steptype030w4s,#steptype031w4s,
#steptype032w4s,#steptype033w4s,#steptype050w4s,#steptype051w4s,
#steptype016w5s,#steptype017w5s,#steptype018w5s,
#steptype019w5s,#steptype020w5s,#steptype021w5s,#steptype022w5s,#steptype023w5s,
#steptype024w5s,#steptype027w5s,#steptype029w5s,#steptype030w5s,#steptype031w5s,
#steptype032w5s,#steptype033w5s,#steptype050w5s,#steptype051w5s,
#steptype016w6s,#steptype017w6s,#steptype018w6s,
#steptype019w6s,#steptype020w6s,#steptype021w6s,#steptype022w6s,#steptype023w6s,
#steptype024w6s,#steptype027w6s,#steptype029w6s,#steptype030w6s,#steptype031w6s,
#steptype032w6s,#steptype033w6s,#steptype050w6s,#steptype051w6s
{FLOAT: left; WIDTH: 31%; TEXT-ALIGN: right; FONT: 70%; OVERFLOW: hidden}
#steptype016w1m,#steptype017w1m,#steptype018w1m,
#steptype019w1m,#steptype020w1m,#steptype021w1m,#steptype022w1m,#steptype023w1m,
#steptype024w1m,#steptype027w1m,#steptype029w1m,#steptype030w1m,#steptype031w1m,
#steptype032w1m,#steptype033w1m,#steptype050w1m,#steptype051w1m,
#steptype016w2m,#steptype017w2m,#steptype018w2m,
#steptype019w2m,#steptype020w2m,#steptype021w2m,#steptype022w2m,#steptype023w2m,
#steptype024w2m,#steptype027w2m,#steptype029w2m,#steptype030w2m,#steptype031w2m,
#steptype032w2m,#steptype033w2m,#steptype050w2m,#steptype051w2m,
#steptype016w3m,#steptype017w3m,#steptype018w3m,
#steptype019w3m,#steptype020w3m,#steptype021w3m,#steptype022w3m,#steptype023w3m,
#steptype024w3m,#steptype027w3m,#steptype029w3m,#steptype030w3m,#steptype031w3m,
#steptype032w3m,#steptype033w3m,#steptype050w3m,#steptype051w3m,
#steptype016w4m,#steptype017w4m,#steptype018w4m,
#steptype019w4m,#steptype020w4m,#steptype021w4m,#steptype022w4m,#steptype023w4m,
#steptype024w4m,#steptype027w4m,#steptype029w4m,#steptype030w4m,#steptype031w4m,
#steptype032w4m,#steptype033w4m,#steptype050w4m,#steptype051w4m,
#steptype016w5m,#steptype017w5m,#steptype018w5m,
#steptype019w5m,#steptype020w5m,#steptype021w5m,#steptype022w5m,#steptype023w5m,
#steptype024w5m,#steptype027w5m,#steptype029w5m,#steptype030w5m,#steptype031w5m,
#steptype032w5m,#steptype033w5m,#steptype050w5m,#steptype051w5m,
#steptype016w6m,#steptype017w6m,#steptype018w6m,
#steptype019w6m,#steptype020w6m,#steptype021w6m,#steptype022w6m,#steptype023w6m,
#steptype024w6m,#steptype027w6m,#steptype029w6m,#steptype030w6m,#steptype031w6m,
#steptype032w6m,#steptype033w6m,#steptype050w6m,#steptype051w6m,
{WIDTH:90%; FONT: 70%; OVERFLOW: hidden}
#name
{FLOAT: left; WIDTH: 20%; OVERFLOW: hidden; FONT: bold;}
#runprog
{FLOAT: left; WIDTH: 5%; OVERFLOW: hidden; FONT: 90%; FONT: bold}
/* technologischer block */
#steptype027 {PADDING-BOTTOM: 0.3%; BACKGROUND-COLOR: #E0FFFF; CLEAR: both}
#text {FLOAT: left; WIDTH:50%; FONT-SIZE:17px; OVERFLOW:_hidden; HEIGHT:20px; TEXT-ALIGN:center; PADDING-TOP:3px;}
/* rezeptende */
#steptype050 {PADDING-BOTTOM: 0.3%; BACKGROUND-COLOR: #FFD0A0; CLEAR: both; HEIGHT: 20px;}
#steptype050stepno {DISPLAY: _none;}
#steptype050stepsubno {DISPLAY: none;}
#steptype050text {FLOAT: left; WIDTH: 25%; OVERFLOW: hidden; FONT: 90%;}
/* bewegungsprogramm im schritt */
#runprog {POSITION: relative; LEFT: 48%; WIDTH: 52%; BACKGROUND-COLOR: #E6E6F0; FONT: 70%; PADDING-LEFT: 1.5%; CLEAR: both}
#runcaption {WIDTH: 19%; FLOAT: left;}
#runvalue {WIDTH: 30%; FLOAT: left;}
/* farbe für kommentar #FFE6E6 */
#steptext {FONT: 80%; CLEAR: both; LINE-HEIGHT: 90%;}
#name_pk {FLOAT: left; PADDING-RIGHT: 2%;}
#action_pk {FLOAT: left; PADDING-RIGHT: 2%;}
#metric_pk {}
/* schalter im schritt */
#flags {POSITION: relative; LEFT: 48%; WIDTH: 52%; BACKGROUND-COLOR: #F0E6B6; FONT: 70%; PADDING-LEFT: 0.5%; CLEAR: both}
/* kommentar */
#comment {WIDTH: 100%; BACKGROUND-COLOR: #D5BEDE; MARGIN-LEFT: 10%; CLEAR: both; TEXT-ALIGN:center; FONT-SIZE: 90%;}
/* chemikalien */
#component {WIDTH: 90%; POSITION: relative; LEFT: 10%; BACKGROUND-COLOR: #FFFFE4; LINE-HEIGHT: 90%; CLEAR: both;}
#componentname {WIDTH: 30%; FLOAT: left; PADDING-LEFT:15%; OVERFLOW: hidden; FONT: 90%; CLEAR: both;}
#componentphysicalclose {WIDTH: 10%; FLOAT: left; FONT-SIZE: 75%; COLOR:gray;}
#componentpercent {WIDTH: 8%; FLOAT: left; TEXT-ALIGN: right; FONT-SIZE: 90%; COLOR:blue;}
#componentunitpercent {WIDTH: 4%; FLOAT: left; FONT-SIZE: 90%; COLOR:blue;}
#componentdefault {WIDTH: 8%; FLOAT: left; TEXT-ALIGN: right; FONT-SIZE: 90%; COLOR:gray;}
#componentunitdefault {WIDTH: 4%; FLOAT: left; FONT-SIZE: 90%; COLOR:gray;}
#componentsetvalue {WIDTH: 8%; FLOAT: left; TEXT-ALIGN: right; FONT-SIZE: 90%;}
#componentunitsetvalue {WIDTH: 4%; FLOAT: left; FONT-SIZE: 90%;}
#componentcurrent {WIDTH: 8%; FLOAT: left; TEXT-ALIGN: right; FONT-SIZE: 90%; COLOR:green;}
#componentunitcurrent {WIDTH: 4%; FLOAT: left; FONT-SIZE: 90%; COLOR:green;}
#componentnumber {TEXT-ALIGN: right; FONT-SIZE: 90%; OVERFLOW: hidden}
.editable {CURSOR:hand; BACKGROUND-COLOR:black; COLOR:white !important; BORDER:1px solid white;}
#aep_ovrl {
background-color: black;
-moz-opacity: 0.7; opacity: 0.7;
top: 0; left: 0; position: fixed;
width: 100%; height:100%; z-index: 99;
}
#aep_ww { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 100%; text-align: center;}
#aep_win { margin: 20% auto 0 auto; width: 400px; text-align: left;}
#aep_w {background-color: white; padding: 3px; border: 1px solid black; background-color: #EEE;}
#aep_t {color: white; margin: 0 0 2px 3px; font-family: Arial, sans-serif; font-size: 10pt;}
#aep_text {width: 100%;}
#aep_w span {font-family: Arial, sans-serif; font-size: 10pt;}
#aep_w div {text-align: right; margin-top: 5px;}
#aep_ovrl {
position: absolute;
filter:alpha(opacity=70);
top: expression(eval(document.body.scrollTop));
width: expression(eval(document.body.clientWidth));
}
#aep_ww {
position: absolute;
top: expression(eval(document.body.scrollTop));
}

View File

View File

@ -0,0 +1,168 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2017-8-29: Created with FontForge (http://fontforge.org)
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20141215 at Tue Aug 29 11:31:31 2017
By Michael Heppler
</metadata>
<defs>
<font id="fontcustom" horiz-adv-x="512" >
<font-face
font-family="fontcustom"
font-weight="400"
font-stretch="normal"
units-per-em="512"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="448"
descent="-64"
bbox="38.2715 -64 475.929 448.001"
underline-thickness="25.6"
underline-position="-51.2"
unicode-range="U+0020-F10F"
/>
<missing-glyph />
<glyph glyph-name="space" unicode=" " horiz-adv-x="200"
/>
<glyph glyph-name="tabular" unicode="&#xf108;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM115.707 229.528l280.893 -0.000976562v-199.242h-280.893v199.243zM217.554 156.534l76.8027 -0.000976562v36.7969h-76.8027v-36.7959zM294.356 139.839l-76.8027 0.000976562v-40.5293h76.8027v40.5283z
M132.402 193.33v-36.7959h68.4561v36.7959h-68.4561zM132.402 139.84v-40.5293h68.4561v40.5293h-68.4561zM132.402 46.9814h68.4561v35.6348h-68.4561v-35.6348zM217.554 46.9814h76.8027v35.6348h-76.8027v-35.6348zM379.905 46.9814h-0.000976562v35.6348h-68.8535
v-35.6348h68.8545zM379.905 99.3105h-0.000976562v40.5283h-68.8535v-40.5283h68.8545zM311.051 156.533h68.8535v36.7969h-68.8535v-36.7969z" />
<glyph glyph-name="document" unicode="&#xf106;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM115.578 390.442v22.5859h169.49v-22.5859h-169.49zM115.578 344.247v22.5859h169.489v-22.5859h-169.489zM115.578 298.051v22.5859h169.49v-22.5859h-169.49zM115.578 251.854v22.5859h280.844v-22.5859h-280.844z
M115.578 204.896v22.5859h280.844v-22.5859h-280.844zM115.578 158.699v22.5859h280.844v-22.5859h-280.844zM115.578 112.504v22.5859h280.844v-22.5859h-280.844zM115.578 66.3076v22.5859h280.844v-22.5859h-280.844zM115.578 19.0879v22.5859h280.844v-22.5859h-280.844
zM115.578 -27.1084v22.5859h280.844v-22.5859h-280.844z" />
<glyph glyph-name="file" unicode="&#xf10a;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM115.707 229.528l280.893 -0.000976562v-199.242h-280.893v199.243zM217.554 156.534l76.8027 -0.000976562v36.7969h-76.8027v-36.7959zM294.356 139.839l-76.8027 0.000976562v-40.5293h76.8027v40.5283z
M132.402 193.33v-36.7959h68.4561v36.7959h-68.4561zM132.402 139.84v-40.5293h68.4561v40.5293h-68.4561zM132.402 46.9814h68.4561v35.6348h-68.4561v-35.6348zM217.554 46.9814h76.8027v35.6348h-76.8027v-35.6348zM379.905 46.9814h-0.000976562v35.6348h-68.8535
v-35.6348h68.8545zM379.905 99.3105h-0.000976562v40.5283h-68.8535v-40.5283h68.8545zM311.051 156.533h68.8535v36.7969h-68.8535v-36.7969z" />
<glyph glyph-name="package" unicode="&#xf10f;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM392.499 217.293v0v-178.433c0 -3.83984 -2.55957 -7.16797 -6.19531 -8.24316l-128.819 -37.2734c-0.0507812 0 -0.15332 -0.0507812 -0.204102 -0.0507812c-0.102539 0 -0.154297 -0.0517578 -0.255859 -0.0517578
c-0.154297 -0.0507812 -0.256836 -0.101562 -0.410156 -0.101562c-0.102539 0 -0.15332 -0.0517578 -0.255859 -0.0517578c-0.15332 0 -0.307617 -0.0507812 -0.460938 -0.0507812h-0.205078c-0.255859 -0.0517578 -0.459961 -0.0517578 -0.665039 -0.0517578
c-0.255859 0 -0.460938 0.0517578 -0.666016 0.0517578h-0.204102c-0.154297 0 -0.307617 0.0507812 -0.460938 0.0507812c-0.102539 0 -0.154297 0.0517578 -0.255859 0.0517578c-0.154297 0.0507812 -0.256836 0.0507812 -0.410156 0.101562
c-0.102539 0 -0.15332 0.0517578 -0.255859 0.0517578c-0.0507812 0 -0.15332 0.0507812 -0.205078 0.0507812l-128.973 37.2734c-3.68652 1.0752 -6.19531 4.45508 -6.19531 8.24316v178.433v0.0507812v0.0517578v0.102539
c0.0517578 0.15332 0.0517578 0.358398 0.0517578 0.511719v0.205078c0.0507812 0.204102 0.0507812 0.40918 0.102539 0.614258v0.102539c0 0.15332 0.0507812 0.358398 0.101562 0.511719c0 0.0507812 0.0517578 0.15332 0.0517578 0.205078
c0.0507812 0.15332 0.102539 0.306641 0.15332 0.459961c0 0.0517578 0.0517578 0.102539 0.0517578 0.154297c0.0507812 0.204102 0.101562 0.40918 0.204102 0.5625c0.0517578 0.0517578 0.0517578 0.102539 0.102539 0.154297
c0.0517578 0.15332 0.15332 0.255859 0.205078 0.40918c0.0507812 0.0517578 0.0507812 0.102539 0.102539 0.15332c0.102539 0.154297 0.204102 0.358398 0.306641 0.512695l0.0517578 0.0507812c0.102539 0.102539 0.204102 0.255859 0.306641 0.410156
c0.0517578 0.0507812 0.0517578 0.101562 0.102539 0.15332c0.102539 0.102539 0.205078 0.255859 0.307617 0.358398l0.102539 0.102539c0.101562 0.15332 0.255859 0.255859 0.40918 0.40918c0.0507812 0 0.102539 0.0517578 0.15332 0.102539
c0.154297 0.102539 0.255859 0.205078 0.358398 0.307617c0.0517578 0.0507812 0.102539 0.101562 0.154297 0.15332c0.0507812 0 0.0507812 0.0507812 0.101562 0.0507812c0.102539 0.0517578 0.205078 0.154297 0.307617 0.205078
c0.0507812 0 0.0507812 0.0507812 0.102539 0.0507812c0.15332 0.102539 0.358398 0.205078 0.511719 0.307617c0.102539 0.0507812 0.15332 0.0507812 0.205078 0.102539c0.15332 0.0507812 0.255859 0.15332 0.40918 0.205078
c0.0517578 0 0.102539 0.0507812 0.154297 0.0507812c0.204102 0.0507812 0.358398 0.15332 0.5625 0.205078c0.0517578 0 0.102539 0.0507812 0.154297 0.0507812c0.204102 0.0517578 0.358398 0.102539 0.511719 0.15332
c0.0507812 0.0517578 0.0507812 0.0517578 0.102539 0.0517578l132.557 35.123c1.48438 0.358398 3.02051 0.358398 4.50586 -0.0507812l125.439 -35.124h0.0517578c0.204102 -0.0507812 0.40918 -0.15332 0.614258 -0.204102h0.0507812
c0.15332 -0.0517578 0.358398 -0.102539 0.511719 -0.205078c0.0517578 -0.0507812 0.102539 -0.0507812 0.154297 -0.102539c0.15332 -0.0507812 0.255859 -0.15332 0.40918 -0.205078c0.0517578 0 0.102539 0 0.15332 -0.0507812
c0.205078 -0.102539 0.358398 -0.205078 0.512695 -0.307617c0.0507812 -0.0507812 0.102539 -0.0507812 0.15332 -0.101562c0.0507812 -0.0517578 0.15332 -0.102539 0.205078 -0.154297c0.0507812 0 0.102539 -0.0507812 0.15332 -0.102539
c0.0507812 -0.0507812 0.102539 -0.101562 0.15332 -0.15332c0.154297 -0.102539 0.255859 -0.255859 0.410156 -0.358398l0.0507812 -0.0507812c0.15332 -0.154297 0.255859 -0.307617 0.410156 -0.460938c0.0507812 0 0.0507812 -0.0517578 0.101562 -0.102539
c0.102539 -0.102539 0.205078 -0.255859 0.307617 -0.358398c0.0507812 0 0.0507812 -0.0507812 0.102539 -0.102539c0.15332 -0.15332 0.255859 -0.358398 0.358398 -0.511719c0 -0.0517578 0.0507812 -0.0517578 0.0507812 -0.102539
c0.102539 -0.15332 0.154297 -0.307617 0.255859 -0.460938c0.0517578 -0.0507812 0.0517578 -0.102539 0.102539 -0.15332c0.0517578 -0.15332 0.154297 -0.307617 0.205078 -0.460938c0 0 0.0507812 -0.0507812 0.0507812 -0.102539
c0.0517578 -0.205078 0.154297 -0.358398 0.205078 -0.563477c0 -0.101562 0.0517578 -0.15332 0.0517578 -0.204102c0 -0.102539 0.0507812 -0.255859 0.101562 -0.410156c0 -0.102539 0.0517578 -0.15332 0.0517578 -0.204102
c0 -0.154297 0.0507812 -0.358398 0.102539 -0.563477v-0.102539c0 -0.15332 0.0507812 -0.358398 0.0507812 -0.511719v-0.205078v-0.563477v-0.0507812zM246.374 12.9531v160.615l-111.872 32.3066v-160.563zM254.925 188.877l40.3965 11.6738l57.3447 16.5889
l-94.2598 26.3672l-100.403 -26.5723l63.8975 -18.4834zM375.398 45.3115v160.615l-111.872 -32.3584v-160.666z" />
<glyph glyph-name="image" unicode="&#xf103;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM155.146 219.049c0 24.5439 19.8975 44.4404 44.4414 44.4404s44.4414 -19.8965 44.4414 -44.4404c0 -24.5449 -19.8975 -44.4414 -44.4414 -44.4414s-44.4414 19.8965 -44.4414 44.4414zM337.292 229.049
l59.3076 -105.122v-119.061h-0.0273438v-6.91602h-280.865v98.5039l13.832 11.0566v-0.000976562l33.2598 27.4824l55.8594 -55.3271l59.0508 110.654zM203.555 58.1465l5.6709 11.9092l-47.0703 45.3682l-32.0762 -27.248l2.01953 -24.3584l13.6113 17.0137
l23.8184 -28.9229l24.3857 17.5801zM360.41 93.1396l14.1836 28.3125l-44.8008 80.5283l-45.4492 -30.8574l-24.8623 -49.3389l24.9473 11.2832l34.0186 -34.1289l27.2168 38.4795z" />
<glyph glyph-name="dataset" unicode="&#xf102;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM115.578 390.442v22.5859h169.49v-22.5859h-169.49zM115.578 344.247v22.5859h169.489v-22.5859h-169.489zM115.578 298.051v22.5859h169.49v-22.5859h-169.49zM115.578 251.854v22.5859h280.844v-22.5859h-280.844z
M115.578 204.896v22.5859h280.844v-22.5859h-280.844zM115.578 158.699v22.5859h280.844v-22.5859h-280.844zM115.578 112.504v22.5859h280.844v-22.5859h-280.844zM115.578 66.3076v22.5859h280.844v-22.5859h-280.844zM115.578 19.0879v22.5859h280.844v-22.5859h-280.844
zM115.578 -27.1084v22.5859h280.844v-22.5859h-280.844z" />
<glyph glyph-name="astro" unicode="&#xf104;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.369v350.35h-122.69v118.652h-206.679v-469.002zM391.215 262.411c11.5938 -11.5947 6.47559 -34.2588 -15.6455 -69.2871c-5.60742 -8.88086 -12.1367 -18.2422 -19.4346 -27.9131c4.13086 -11.2793 6.38379 -23.4639 6.38379 -36.1738
c0 -58.1104 -47.1074 -105.22 -105.218 -105.22c-12.666 0 -24.8096 2.23926 -36.0566 6.3418c-9.90332 -7.49902 -19.4893 -14.1963 -28.5703 -19.9307c-22.9121 -14.4688 -40.5381 -21.6641 -53.2314 -21.665c-6.71191 -0.000976562 -12.0449 2.01074 -16.0547 6.02051
c-4.83789 4.83984 -6.7627 11.7695 -5.71973 20.5986c0.783203 6.62402 3.31445 14.6055 7.52441 23.7236c6.91895 14.9814 18.4443 33.2529 33.5459 53.2275c-4.30176 11.4834 -6.65625 23.918 -6.65625 36.9033c0 58.1094 47.1084 105.218 105.22 105.218
c13.0293 0 25.5039 -2.36816 37.0195 -6.69824c20.1035 15.1475 38.4668 26.6494 53.4287 33.4414c8.91797 4.04785 16.7324 6.46094 23.2285 7.17285c8.65723 0.949219 15.4648 -0.989258 20.2363 -5.75977zM183.484 26.7207
c5.99414 3.81348 12.2236 8.07129 18.627 12.7158c-13.749 8.48438 -25.3965 20.0449 -33.9854 33.7217c-11.2783 -15.5518 -19.9834 -29.6807 -25.5049 -41.4551c-8.75781 -18.6748 -5.94531 -23.7559 -5.91113 -23.7949
c0.463867 -0.397461 3.97656 -1.33203 12.6104 1.42676c8.99023 2.87109 20.8037 8.88379 34.1641 17.3857zM346.835 184.338c4.45801 6.17285 8.55762 12.1826 12.2422 17.9717c8.50293 13.3594 14.5146 25.1738 17.3877 34.1641
c2.75684 8.63672 1.82324 12.1494 1.42285 12.6172c-0.0351562 0.0283203 -4.96387 2.77148 -23.04 -5.56641c-11.7383 -5.41406 -25.915 -14.0859 -41.5566 -25.3838c13.5928 -8.55762 25.0879 -20.1406 33.5439 -33.8027z" />
<glyph glyph-name="unlock" unicode="&#xf10e;"
d="M475.929 -25.8672c0 -21.0557 -16.9902 -38.125 -37.9463 -38.125h-361.764c-20.958 0 -37.9473 17.0693 -37.9473 38.125v242.271c0 21.0547 16.9893 38.125 37.9473 38.125h361.763c20.957 0 37.9473 -17.0703 37.9473 -38.125v-242.271v0zM365.643 397.034
l20.6064 -52.3926l-73.0195 -28.7412l-13.3633 33.9902c-4.25781 10.8203 -16.5273 16.1201 -27.4043 11.8389l-72.8105 -28.6602c-10.8779 -4.28125 -16.2432 -16.5225 -11.9844 -27.3418l62.624 -159.1l-74.207 -29.208l-69.8672 177.501
c-16.2607 41.3125 4.04688 87.9824 45.3584 104.243l109.825 43.2295c41.3105 16.2598 87.9814 -4.04688 104.242 -45.3594z" />
<glyph glyph-name="code" unicode="&#xf10b;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM206.965 90.2354c0 -2.6084 -0.105469 -4.65234 -0.316406 -6.13281c-0.211914 -1.48145 -0.546875 -2.53809 -1.00488 -3.17188c-0.458984 -0.634766 -1.02246 -0.916992 -1.69141 -0.845703
c-0.670898 0.0693359 -1.5332 0.351562 -2.59082 0.845703l-81.1055 40.3936c-0.988281 0.564453 -1.71094 1.74512 -2.16797 3.54297c-0.458984 1.79785 -0.6875 4.49414 -0.6875 8.08984c0 1.83203 0.0693359 3.43652 0.211914 4.81055
c0.139648 1.375 0.317383 2.50195 0.52832 3.38379c0.211914 0.880859 0.510742 1.58691 0.898438 2.11523c0.386719 0.52832 0.828125 0.932617 1.32227 1.21582l81 40.1826c2.04395 0.986328 3.48926 0.792969 4.33594 -0.582031
c0.845703 -1.375 1.26855 -4.17676 1.26855 -8.40723c0 -2.89062 -0.0527344 -5.18164 -0.158203 -6.87305c-0.106445 -1.69141 -0.300781 -3.03125 -0.582031 -4.01855c-0.282227 -0.987305 -0.670898 -1.69141 -1.16309 -2.11426
c-0.494141 -0.422852 -1.16211 -0.845703 -2.00879 -1.26953l-60.9082 -28.5508l59.7451 -27.7051c1.05664 -0.494141 1.91992 -0.988281 2.59082 -1.48047c0.668945 -0.494141 1.17969 -1.25293 1.5332 -2.27344c0.352539 -1.02246 0.597656 -2.39746 0.740234 -4.12402
c0.139648 -1.72656 0.209961 -4.07031 0.209961 -7.03125zM236.053 44.4492c-0.352539 -0.916016 -0.811523 -1.65625 -1.37402 -2.22168c-0.56543 -0.563477 -1.3584 -1.02051 -2.37988 -1.375c-1.02246 -0.351562 -2.29199 -0.616211 -3.80664 -0.792969
c-1.5166 -0.174805 -3.43652 -0.264648 -5.7627 -0.264648c-2.8916 0 -5.25195 0.142578 -7.08496 0.422852c-1.83398 0.283203 -3.22461 0.705078 -4.17676 1.26953c-0.952148 0.56543 -1.49902 1.28711 -1.63965 2.16797c-0.141602 0.881836 0 1.9209 0.423828 3.11914
l63.2344 177.544c0.28125 0.916016 0.703125 1.67383 1.26953 2.27344c0.5625 0.597656 1.33789 1.07422 2.32617 1.42773c0.986328 0.351562 2.27344 0.616211 3.85938 0.792969c1.58594 0.174805 3.50684 0.263672 5.76367 0.263672
c2.95996 0 5.33984 -0.141602 7.1377 -0.422852c1.79785 -0.282227 3.15332 -0.705078 4.07031 -1.26855c0.915039 -0.56543 1.44434 -1.28711 1.58594 -2.16797c0.140625 -0.882812 0.0351562 -1.9209 -0.317383 -3.11914zM394.254 132.64
c0 -1.83398 -0.0712891 -3.4209 -0.211914 -4.75879c-0.140625 -1.33984 -0.333984 -2.46875 -0.581055 -3.38379c-0.24707 -0.916992 -0.564453 -1.63867 -0.951172 -2.16699c-0.388672 -0.529297 -0.830078 -0.899414 -1.32227 -1.11035l-81.1055 -40.1826
c-0.988281 -0.494141 -1.83496 -0.705078 -2.53809 -0.634766c-0.705078 0.0703125 -1.28711 0.458008 -1.74512 1.16309c-0.458008 0.704102 -0.775391 1.74512 -0.951172 3.12012c-0.176758 1.37402 -0.263672 3.11914 -0.263672 5.23438
c0 2.88965 0.0527344 5.18066 0.158203 6.87305s0.298828 3.03027 0.582031 4.01855c0.28125 0.987305 0.669922 1.70801 1.16309 2.16797c0.491211 0.458008 1.16309 0.861328 2.00879 1.21582l60.9092 28.5508l-59.7461 27.7051
c-1.12793 0.492188 -2.02637 0.986328 -2.69629 1.48047c-0.670898 0.492188 -1.18164 1.25 -1.5332 2.27344c-0.353516 1.02051 -0.582031 2.39551 -0.6875 4.12402c-0.105469 1.72656 -0.158203 4.07031 -0.158203 7.03125c0 2.60742 0.0869141 4.65332 0.263672 6.13379
c0.175781 1.47949 0.493164 2.53711 0.951172 3.17188c0.458984 0.633789 1.04004 0.915039 1.74512 0.845703c0.703125 -0.0712891 1.5498 -0.353516 2.53809 -0.845703l81.2109 -40.5c0.915039 -0.423828 1.63965 -1.55176 2.16797 -3.38379
c0.52832 -1.83398 0.792969 -4.54785 0.792969 -8.14258z" />
<glyph glyph-name="video" unicode="&#xf109;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM393.035 155.245h0.000976562v-136.743l-80.1689 46.2861v-54.1758h-193.78v141.273h24.5869c-15.6006 8.04688 -26.2744 24.3066 -26.2744 43.0693c0 26.7549 21.6895 48.4443 48.4453 48.4443
c26.7549 0 48.4453 -21.6895 48.4453 -48.4443c0 -18.7627 -10.6748 -35.0225 -26.2754 -43.0693h56.9707c-15.6006 8.04688 -26.2734 24.3066 -26.2734 43.0693c0 26.7549 21.6885 48.4443 48.4443 48.4443c26.7549 0 48.4453 -21.6895 48.4453 -48.4443
c0 -18.7627 -10.6748 -35.0225 -26.2754 -43.0693h23.541v-42.9268z" />
<glyph glyph-name="dataverse" unicode="&#xf100;"
d="M266.787 -63.7441c-34.1826 0 -63.501 10.5283 -87.6299 36.1436c-24.1299 25.6182 -36.3027 53.2461 -36.2842 87.2793c-0.0175781 34.0371 13.877 65.0029 36.2842 87.2861c14.4639 14.4277 32.6104 25.2881 52.8447 31.1895l-22.0381 98.7832
c-0.977539 -0.0371094 -1.90625 -0.142578 -2.88477 -0.142578c-23.6602 -0.0136719 -45.1855 9.58691 -60.6836 25.0381c-15.5146 15.417 -25.1621 36.8779 -25.1387 60.4395c-0.0234375 23.5586 9.62402 45.0039 25.1387 60.4355
c15.4971 15.4355 37.0234 25.0361 60.6836 25.0361c23.6699 0 45.1748 -9.60059 60.6846 -25.0361c15.498 -15.4326 25.1416 -36.8896 25.1416 -60.4355c0 -23.5615 -9.6416 -45.0225 -25.1416 -60.4395c-6.86328 -6.84082 -14.9756 -12.4639 -23.8604 -16.6787
l22.7598 -102.048c0.0478516 0 0.0761719 0.0146484 0.124023 0.0146484c34.1836 0.0126953 65.2773 -13.8594 87.6484 -36.1553c22.3984 -22.2734 36.3086 -53.249 36.3086 -87.2861c0 -34.0332 -13.9102 -64.9814 -36.3086 -87.2803
c-22.373 -22.2979 -53.4658 -36.1436 -87.6484 -36.1436zM147.449 362.272c0 -16.4385 6.66211 -31.2129 17.4727 -41.9951c10.8281 -10.7734 25.6445 -17.3965 42.1572 -17.4082c16.5215 0.0107422 31.3281 6.63379 42.1582 17.3926
c10.8086 10.7979 17.4521 25.5596 17.4521 42.0107c0 16.4336 -6.64355 31.1895 -17.4521 41.9785c-10.8301 10.7754 -25.6357 17.3867 -42.1582 17.3975c-16.5127 -0.0117188 -31.3291 -6.62207 -42.1572 -17.3975c-10.8398 -10.7891 -17.4727 -25.5449 -17.4727 -41.9785z
M329.748 -3.00293c16.1152 16.0977 26.041 38.1455 26.0713 62.6836c-0.0302734 24.541 -9.95605 46.5889 -26.0713 62.6914c-16.1611 16.0684 -38.3037 25.9434 -62.9609 25.9551c-24.6387 -0.00878906 -46.752 -9.88574 -62.9141 -25.9551
c-16.1445 -16.1025 -26.0713 -38.1523 -26.0713 -62.6914c0 -24.5371 9.92676 -46.585 26.0713 -62.6836c16.1611 -16.0693 38.2754 -25.9424 62.9141 -25.957c24.6572 0.0126953 46.7988 9.88672 62.9609 25.957z" />
<glyph glyph-name="geodata" unicode="&#xf107;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM255.517 -10.7539c-36.6543 0 -71.1143 14.2744 -97.0322 40.1924c-25.9189 25.9199 -40.1934 60.3799 -40.1934 97.0332s14.2744 71.1133 40.1934 97.0332c25.918 25.9189 60.3779 40.1924 97.0322 40.1924
c36.6533 0 71.1143 -14.2734 97.0332 -40.1924c25.918 -25.9199 40.1924 -60.3799 40.1924 -97.0332s-14.2744 -71.1133 -40.1924 -97.0332c-25.9199 -25.918 -60.3799 -40.1924 -97.0332 -40.1924zM263.665 5.82031l0.548828 0.0390625
c28.9033 2.06348 56.167 14.5459 76.7676 35.1465s33.083 47.8643 35.1475 76.7686l0.0390625 0.547852h-22.708v16.2979h22.708l-0.0390625 0.547852c-2.06445 28.9043 -14.5469 56.167 -35.1475 76.7686c-20.6006 20.5996 -47.8633 33.083 -76.7676 35.1465
l-0.548828 0.0390625v-22.707h-16.2969v22.707l-0.548828 -0.0390625c-28.9043 -2.06445 -56.167 -14.5469 -76.7686 -35.1465c-20.6006 -20.6016 -33.083 -47.8643 -35.1465 -76.7686l-0.0390625 -0.547852h22.708v-16.2979h-22.708l0.0390625 -0.547852
c2.06445 -28.9043 14.5469 -56.168 35.1465 -76.7686c20.6016 -20.6006 47.8643 -33.083 76.7686 -35.1465l0.548828 -0.0390625v17.1553h16.2969v-17.1553zM255.517 263.185c-36.5176 0 -70.8486 -14.2207 -96.6709 -40.042
c-25.8213 -25.8232 -40.042 -60.1543 -40.042 -96.6719c0 -36.5166 14.2207 -70.8477 40.042 -96.6709c25.8223 -25.8213 60.1533 -40.042 96.6709 -40.042c36.5166 0 70.8486 14.2207 96.6709 40.042c25.8223 25.8232 40.042 60.1543 40.042 96.6709
c0 36.5176 -14.2197 70.8486 -40.042 96.6719c-25.8223 25.8213 -60.1543 40.042 -96.6709 40.042zM263.153 224.928v21.6455v1.09961l1.09668 -0.078125c29.0264 -2.07324 56.4062 -14.6084 77.0938 -35.2959s33.2227 -48.0674 35.2959 -77.0938l0.0791016 -1.09766
h-1.10059h-21.6455v-15.2725h21.6455h1.10059l-0.0791016 -1.09766c-2.07324 -29.0264 -14.6084 -56.4062 -35.2959 -77.0928c-20.6875 -20.6885 -48.0674 -33.2236 -77.0938 -35.2969l-1.09668 -0.078125v1.09961v16.0947h-15.2734v-16.0947v-1.09961l-1.09766 0.078125
c-29.0264 2.07324 -56.4053 14.6084 -77.0928 35.2969c-20.6885 20.6865 -33.2227 48.0664 -35.2959 77.0928l-0.078125 1.09766h1.09961h21.6465v15.2725h-21.6465h-1.09961l0.078125 1.09766c2.07324 29.0273 14.6074 56.4062 35.2959 77.0938
c20.6875 20.6875 48.0664 33.2227 77.0928 35.2959l1.09766 0.078125v-1.09961v-21.6455h15.2734zM255.517 264.208v0c36.79 0 71.3799 -14.3271 97.3945 -40.3418c26.0156 -26.0156 40.3428 -60.6045 40.3428 -97.3955c0 -36.79 -14.3271 -71.3789 -40.3428 -97.3945
c-26.0146 -26.0146 -60.6045 -40.3418 -97.3945 -40.3418c-36.791 0 -71.3789 14.3271 -97.3945 40.3418c-26.0156 26.0156 -40.3428 60.6045 -40.3428 97.3945c0 36.792 14.3271 71.3799 40.3428 97.3955c26.0146 26.0146 60.6035 40.3418 97.3945 40.3418z
M246.855 223.903v0v22.6699c-59.5088 -4.25 -107.191 -51.9316 -111.44 -111.441h22.6699v-17.3203h-22.6699c4.25 -59.5088 51.9316 -107.191 111.44 -111.441v17.1182h17.3213v-17.1182c59.5088 4.25 107.19 51.9316 111.441 111.441h-22.6699v17.3203h22.6699
c-4.25098 59.5098 -51.9326 107.191 -111.441 111.441v-22.6699h-17.3213zM223.457 158.531l113.237 49.1191l-49.1201 -113.237l-113.236 -49.1201zM201.481 72.4375l60.9619 26.4434l-34.5176 34.5176zM335.709 206.665l-111.862 -48.5234l-48.5234 -111.863
l111.862 48.5244zM200.496 71.4521l1.03125 2.37891l25.6289 59.0811l0.598633 1.38086l1.06445 -1.06445l33.4531 -33.4531l1.06445 -1.06445l-1.38086 -0.599609l-59.0811 -25.627zM337.681 208.636v0l-49.7168 -114.611l-114.612 -49.7168l49.7168 114.613z
M202.468 73.4238v0l59.0811 25.627l-33.4531 33.4531z" />
<glyph glyph-name="audio" unicode="&#xf105;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM371.032 265.229l0.0410156 -190.561h-0.0859375c-1.10156 -21.9277 -23.7656 -39.4336 -51.5654 -39.4336c-28.5068 0 -51.6133 18.4014 -51.6133 41.1035c0 22.6992 23.1064 41.1035 51.6133 41.1035
c10.0078 0 19.3486 -2.27246 27.2607 -6.19922v100.195l-110.433 -26.915v-147.39c0.197266 -1.46191 0.301758 -2.94629 0.301758 -4.4502c0 -22.7021 -23.1084 -41.1035 -51.6123 -41.1035s-51.6104 18.4014 -51.6104 41.1035c0 22.7012 23.1064 41.1035 51.6104 41.1035
c9.86523 0 19.083 -2.20508 26.9209 -6.0293l-0.106445 158.653z" />
<glyph glyph-name="other" unicode="&#xf10d;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002z" />
<glyph glyph-name="network" unicode="&#xf10c;"
d="M324.106 448l118.077 -115.579v-376.978c0 -10.7373 -8.70605 -19.4434 -19.4443 -19.4434h-333.479c-10.7393 0 -19.4434 8.70605 -19.4434 19.4434v473.113c0 10.7373 8.7041 19.4434 19.4434 19.4434h234.847zM319.493 422.432v-93.084h95.0947zM91.3154 -42.501
h329.368v350.35h-122.689v118.652h-206.679v-469.002zM113.53 197.376c0 28.6289 23.209 51.8379 51.8379 51.8379s51.8369 -23.209 51.8369 -51.8379s-23.208 -51.8379 -51.8369 -51.8379s-51.8379 23.209 -51.8379 51.8379zM155.128 41.6895
c0 28.6289 23.208 51.8369 51.8369 51.8369c28.6299 0 51.8379 -23.208 51.8379 -51.8369s-23.208 -51.8379 -51.8379 -51.8379c-28.6289 0 -51.8369 23.209 -51.8369 51.8379zM269.815 214.272c0 28.6289 23.209 51.8379 51.8379 51.8379s51.8369 -23.209 51.8369 -51.8379
s-23.208 -51.8369 -51.8369 -51.8369s-51.8379 23.208 -51.8379 51.8369zM295.542 78.2793c0 28.6289 23.209 51.8369 51.8379 51.8369s51.8369 -23.208 51.8369 -51.8369s-23.208 -51.8379 -51.8369 -51.8379s-51.8379 23.209 -51.8379 51.8379zM222.548 44.2441
c-0.575195 -0.795898 -1.20703 -1.39551 -1.89453 -1.79883c-0.69043 -0.400391 -1.57324 -0.641602 -2.65137 -0.723633c-1.07812 -0.0800781 -2.37305 -0.0126953 -3.88281 0.201172c-1.51172 0.216797 -3.3916 0.619141 -5.64062 1.21094
c-2.7959 0.735352 -5.04395 1.47363 -6.74414 2.21094c-1.70215 0.739258 -2.94043 1.50195 -3.7168 2.29004c-0.776367 0.789062 -1.12207 1.62598 -1.03418 2.51367c0.0878906 0.888672 0.489258 1.8584 1.20312 2.9082l106.321 155.616
c0.504883 0.814453 1.10547 1.44043 1.80566 1.87598c0.696289 0.435547 1.56738 0.699219 2.61328 0.789062c1.04395 0.0898438 2.35547 0.0185547 3.93457 -0.213867c1.57812 -0.234375 3.45801 -0.636719 5.64062 -1.21094
c2.86328 -0.75293 5.12891 -1.49609 6.79492 -2.22461c1.66699 -0.730469 2.87109 -1.48438 3.61426 -2.2627c0.741211 -0.779297 1.06934 -1.6123 0.982422 -2.5c-0.0888672 -0.888672 -0.454102 -1.86719 -1.10059 -2.93555zM153.63 194.42
c-0.941406 0.699219 -1.64746 1.42773 -2.11621 2.18359c-0.46582 0.758789 -0.735352 1.69141 -0.811523 2.79785c-0.0732422 1.10645 0.0351562 2.41211 0.324219 3.91406c0.291992 1.50391 0.814453 3.35449 1.57227 5.55371
c0.941406 2.7334 1.875 4.90918 2.79688 6.53027c0.922852 1.62109 1.86328 2.76855 2.8252 3.44434c0.962891 0.674805 1.97363 0.904297 3.03711 0.686523c1.06348 -0.21582 2.21777 -0.763672 3.46289 -1.64062l184.372 -130.411
c0.964844 -0.629883 1.70215 -1.33105 2.21094 -2.10449c0.504883 -0.770508 0.803711 -1.69238 0.889648 -2.76758c0.0849609 -1.07324 -0.0292969 -2.39453 -0.342773 -3.96387c-0.3125 -1.56836 -0.835938 -3.41992 -1.57129 -5.55371
c-0.963867 -2.7998 -1.9043 -4.99219 -2.81348 -6.58105c-0.912109 -1.58691 -1.8418 -2.7002 -2.79004 -3.34375c-0.951172 -0.639648 -1.95801 -0.853516 -3.01953 -0.636719c-1.06543 0.21875 -2.23145 0.730469 -3.49805 1.54102zM226.966 27.6621
c0.262695 -0.945312 0.336914 -1.8125 0.222656 -2.60254c-0.117188 -0.788086 -0.480469 -1.62988 -1.08789 -2.52246c-0.610352 -0.892578 -1.4707 -1.8623 -2.58105 -2.9082c-1.1123 -1.04688 -2.59961 -2.26465 -4.46582 -3.65332
c-2.31934 -1.72656 -4.29883 -3.02051 -5.93652 -3.88965c-1.63965 -0.868164 -3.00781 -1.36035 -4.10938 -1.47559c-1.10059 -0.114258 -1.96973 0.137695 -2.6084 0.760742c-0.639648 0.62207 -1.14648 1.54199 -1.52246 2.75488l-55.251 180.189
c-0.321289 0.902344 -0.435547 1.7627 -0.338867 2.58203c0.0947266 0.81543 0.431641 1.66016 1.01367 2.53418c0.582031 0.871094 1.45605 1.85156 2.62305 2.94043c1.16797 1.08691 2.65527 2.30469 4.46582 3.65137c2.375 1.76758 4.36914 3.07422 5.97949 3.92188
c1.61133 0.84668 2.95117 1.31641 4.02246 1.41211c1.07227 0.0927734 1.92773 -0.170898 2.56641 -0.792969c0.639648 -0.624023 1.17578 -1.51953 1.60742 -2.69238zM361.474 91.7939c0.163086 -0.733398 0.166016 -1.43848 0.00683594 -2.11621
c-0.163086 -0.676758 -0.548828 -1.44531 -1.15625 -2.30566c-0.609375 -0.860352 -1.44727 -1.83203 -2.51172 -2.91699c-1.06836 -1.08496 -2.48242 -2.38477 -4.24609 -3.90137c-2.19336 -1.88477 -4.05078 -3.34473 -5.57324 -4.38477
c-1.52441 -1.04004 -2.77832 -1.71582 -3.7666 -2.02539c-0.989258 -0.308594 -1.74414 -0.269531 -2.26758 0.12207c-0.523438 0.392578 -0.90625 1.05664 -1.15137 1.99023l-35.8848 138.773c-0.220703 0.685547 -0.257812 1.37793 -0.112305 2.07617
c0.144531 0.695312 0.507812 1.46191 1.09082 2.30078c0.582031 0.835938 1.43262 1.82031 2.55176 2.95215c1.12012 1.12988 2.53516 2.42969 4.24609 3.90137c2.24512 1.92969 4.11816 3.40234 5.61328 4.41992c1.49707 1.0166 2.72559 1.66797 3.68555 1.95605
c0.961914 0.286133 1.7041 0.234375 2.22656 -0.157227c0.523438 -0.393555 0.935547 -1.0332 1.23242 -1.9209z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

BIN
static/images/blank.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
static/images/calendar_arrows.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

BIN
static/images/combo_arrow.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

BIN
static/images/datagrid_icons.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

BIN
static/images/datebox_arrow.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

BIN
static/images/layout_arrows.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
static/images/linkbutton_bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/images/loading.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/images/menu_arrows.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
static/images/panel_tools.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

BIN
static/images/slider_handle.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

BIN
static/images/spinner_arrows.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

BIN
static/images/tabs_icons.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

BIN
static/images/tree_icons.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

692
static/jeasyui/changelog.txt Executable file
View File

@ -0,0 +1,692 @@
Version 1.9.x
-------------
* Bug
* layout: The icon on the collapsed panel is overlaped by title. fixed.
* propertygrid: The css style of the row expander will affact that in the detailview. fixed.
* combogrid: The 'getValues' method returns incorrect values sometimes. fixed.
* Improvement
* datagrid: The 'sorter' function on the column accepts the entire row as the sorting parameters.
* datagrid: Add 'hformatter' and 'hstyler' properties for the colomns.
* datebox: Add 'getDate' and 'setDate' methods.
* pagination: Add 'onBeforeSelectPage' event.
* combo: Prevent from conflicting with svg.
* window: Add 'fixed' property.
* timepicker: Add 'hour24' property.
* layout: Add 'stopCollapsing' method.
Version 1.9.0
-------------
* Bug
* datagrid: Slow scrolling with mousewheel on frozen columns. fixed.
* datagrid: The 'rowStyler' function is called on empty row. fixed.
* linkbutton: Calling 'disable' method still can submit the form. fixed.
* combotree: The 'onBeforeSelect' event fires twice while selecting a node. fixed.
* combotreegrid: The 'onSelect' event fires twice while selecting a row. fixed.
* Improvement
* checkbox: Add 'readonly' property.
* radiobutton: Add 'readonly' property.
* Compatible with jQuery 3.x.
* New Plugins
* timepicker: Allow the user to choose time on a clock.
Version 1.8.0
-------------
* Bug
* treegrid: The 'pageNumber' can't be initialized with the specified value. fixed.
* checkbox: The disabled checkbox has no disabled label. fixed.
* Improvement
* switchbutton: Add the 'label','labelAlign','labelPosition','labelWidth' properties.
* switchbutton: Accept 'tabindex' attribute to get focus when the user press TAB key.
* form: The 'onChange' event is available for all the form component.
* calendar: The 'Date' property is available to support the hijri date.
* textbox: The floating label is available.
Version 1.7.0
-------------
* Bug
* sidemenu: The tooltip has a wrong position when the 'floatMenuPosition' is set to 'left'. fixed.
* datagrid: The horizontal scrollbar has a wrong state when the 'showHeader' is set to true. fixed.
* combo: The initialized value will trigger the form's 'onChange' event when the 'multiple' is set to true. fixed.
* panel: The horizontal panel doesn't work normally when 'noheader' property is set to true. fixed.
* pagination: The extended buttons may lose in IE when rebuild the component. fixed.
* Improvement
* tree: Add 'findBy' method to find a node by any fields.
* tree: The 'find' method is enhanced to find a node easily.
* combo: Add 'panelValign' property.
* datagrid: The sorting parameters will be ignored when the 'remoteSort' is set to false.
* timespinner: Add 'hour12' property to display in 12 hour format.
Version 1.6.0
-------------
* Bug
* maskedbox: The component does not accept numeric keypad. fixed.
* combogrid: When selecting multiple records, the datagrid will scroll to the last checked record. fixed.
* Improvement
* Compatible with jQuery 3.x.
* tabs: The 'toolPosition' property can accept 'top' and 'bottom' values.
* textbox: The textbox label has the animating feature when focus or blur on it.
* tooltip: Add 'valign' property.
* tree: The node class can be initialized by setting the 'nodeCls' in the data.
* New Plugins
* sidemenu: The sidemenu is created from accordion and tree plugins. It builds a collapsible menu with some categories.
* radiobutton: This plugin provides a round interface to select one option from a number of options.
* checkbox: This plugin allows a user to select a value from a small set of options.
Version 1.5.5
-------------
* Bug
* tabs: The selecting history has wrong order when the title contains complex elements. fixed.
* combo: The drop-down panel may not be hidden if a bigger 'delay' value is set. fixed.
* layout: The expanding panel does not collapse when move mouse quickly away from it. fixed.
* tagbox: The tagbox and the label don't stay in the same line. fixed.
* Improvement
* combo: The 'blur' event handler is attached to the 'inputEvents' property.
* numberbox: The 'cloneFrom' method is available.
* slider: The 'step' property can be set with a floating number.
* menu: The 'findItem' method allows the user to find menu item by any parameters.
* menubutton: Add 'showEvent' and 'hideEvent' properties.
* New Plugins
* maskedbox: The maskedbox enforces its structure as the user types.
Version 1.5.4
-------------
* Bug
* combotreegrid: The 'onChange' event does not fire when entering values on the inputing box. fixed.
* combobox: Clicking on the drop-down panel will jump to the bottom of body on win10 IE11. fixed.
* datebox: Clicking on the 'Today' button doesn't trigger the 'onSelect' event. fixed.
* propertygrid: The 'getChanges' method doesn't work after editing the only one row. fixed.
* Improvement
* combo: Add the 'panelEvents' property.
* combo: Attach the default 'mousedown' event handler.
* combobox: The 'setValues' method can be called to initialize the displaying text.
* combotreegrid: Press ENTER key to select the highlighted rows.
* panel: Improve the resizing performance.
* filebox: The 'files' method allows the user to get the selected file list.
* searchbox: Improvent the 'selectName' method.
Version 1.5.3
-------------
* Bug
* combobox: The 'iconCls' property can not be parsed from the <option> markup. fixed.
* combobox: Clicking scrollbar will cause the drop-down panel to be hidden in IE. fixed.
* pagination: The pagination height will shrink when the 'displayMsg' property is set to false. fixed.
* tabs: The tab panel takes a wrong 'data' parameter in the 'onLoad' event. fixed.
* Improvement
* draggable: Add 'onEndDrag' event.
* resizable: Retrieve more than one resizing directions with different edges.
* datagrid: Add 'resizeEdge' property.
* datagrid: Avoid the memory leaks.
* combo: The 'originalValue' property value is corrected in multiple mode.
* form: Add the tagbox to the form fields.
* tagbox: Add the 'reset' method.
* progress: Increase the response time to open and close the progress message window.
Version 1.5.2
-------------
* Bug
* form: The initialized value of the inputing box will disappear after calling the 'reset' method. fixed.
* textbox: Calling the 'destroy' method does not clean the field label. fixed.
* datagrid: Calling the 'selectRow' method on an unexisting row causes undesired record set. fixed.
* Improvement
* datagrid: The ctrl selection is supported on Mac keyboards.
* datagrid: The 'scrollOnSelect' property is available for the user to determine whether to scroll to the specified row when selecting it.
* combotree: Add the 'textField' property.
* combotreegrid: Add the 'textField' property.
* pagination: Add 'showPageInfo' property.
* panel: Add 'halign' and 'titleDirection' properties to allow the user to align the panel header to left or right side.
* accordion: Add 'halign' property to build the horizontal accordion.
* tagbox: The 'required' propery can be applied to validate whether the value is empty.
Version 1.5.1
-------------
* Bug
* datagrid: The selecting and checking flags will lose after calling 'updateRow' method. fixed.
* tabs: The trip tools have a wrong position when calling 'update' method. fixed.
* window: When the height is set to 'auto', it will disappear after moving the window. fixed.
* messager: When display the progress message window and then close it immediately, an exception occurs. fixed.
* form: The 'clear' method does not clear the selected drop-down items of the combobox. fixed.
* Improvement
* textbox: The 'cls' property is available to add a custom style to textbox.
* numberbox: Allow the user to format currency in Italian.
* combo: Add 'multivalue' property that allows the user to determine how to submit the multiple values.
* combobox: Add 'reversed' property.
* combobox: Add 'onClick' event.
* combogrid: Add 'reversed' property.
* treegrid: Enable multiple selection with the shift key.
* New Plugins
* tagbox: Allows the user to add tags to a form field.
Version 1.5
-------------
* Bug
* combobox: The 'onSelect' event does not fire when load data that contains the selected item. fixed.
* datagrid: The 'updateRow' method sometimes does not work properly when the field is set to a blank value. fixed.
* Improvement
* A label can be associated to any form fields.
* combobox: Enhance the 'select' and 'unselect' rules on the drop-down items.
* combobox: Add 'limitToList' property to limit the inputed values to the listed items.
* combogrid: Allow the user to clone the component quickly.
* form: Add the 'dirty' property that allows the user to submit the only changed fields.
* form: Add 'resetDirty' method.
* datagrid: Allow the user to display a message when there are no records to be shown.
* textbox: Add 'label','labelWidth','labelPosition' and 'labelAlign' properties.
* spinner: Add 'spinAlign' property.
* calendar: Allow the user to display week number of the year.
* window: Add 'constrain' property.
* New Plugins
* passwordbox: The plugin that allows the user to input passwords with nice feedback.
* combotreegrid: Combines combobox with drop-down treegrid component.
Version 1.4.5
-------------
* Bug
* datagrid: The 'getChanges' method does not return the updated rows after calling 'updateRow' method. fixed.
* treegrid: The 'onLoadSuccess' event fires when append or insert a row. fixed.
* tree: The 'onLoadSuccess' event fires when append or insert a node. fixed.
* Improvement
* window: The displaying style can be customized.
* window: The 'border' property allows the user to set different border style.
* navpanel: The 'href' property is enabled to load content from remote server.
* combotree: The 'setValue' and 'setValues' methods accept the paremter values in 'id' and 'text' pairs
* combobox: Add 'showItemIcon' property.
* combobox: Set 'groupPosition' property to 'sticky' to stick the item group to the top of drop-down panel.
* messager: Pressing ENTER key on input box will trigger click event of the first button.
* validatebox: Add 'editable',disabled' and 'readonly' properties.
* validatebox: Add 'enable','disable','readonly' methods.
* validatebox: Allow the user to determine how to display the error message.
* filebox: Add 'accept' and 'multiple' properties.
* form: Add 'iframe' property and 'onProgress' event.
* treegrid: Add cascade checkbox selection.
* treegrid: Add 'getCheckedNodes','checkNode' and 'uncheckNode' methods.
Version 1.4.4
-------------
* Bug
* filebox: The 'clear' and 'reset' methods do not work properly in IE9. fixed.
* messager: After calling $.messager.progress() with no arguments, the $.messager.progress('close') does not work properly. fixed.
* timespinner: The value does not display properly in IE8 while clicking the spin buttons. fixed.
* window: The window does not display when calling 'options' method in 'onMove' event. fixed.
* treegrid: The 'getLevel' method does not accept the parameter value of 0. fixed.
* Improvement
* layout: The 'collapsedContent','expandMode' and 'hideExpandTool' properties are supported in region panel.
* layout: The 'hideCollapsedContent' property can be set to display the vertical title bar on collapsed panel.
* layout: Add 'onCollapse','onExpand','onAdd','onRemove' events.
* datagrid: Display the 'up-down' icon on the sortable columns.
* datagrid: Add 'gotoPage' method.
* propertygrid: Add 'groups' method that allows to get all the data groups.
* messager: Auto scroll feature is supported when displaying long messages.
* tabs: The 'disabled' property is supported when defining a disabled tab panel.
* tabs: The percentange size is supported now.
Version 1.4.3
-------------
* Bug
* textbox: The 'setText' method does not accept value 0. fixed.
* timespinner: When running in IE11, the error occurs when clicking on the empty textbox. fixed.
* tabs: The 'update' method can not update only the panel body. fixed.
* Improvement
* combobox: Improve the performance of displaying the drop-down panel.
* combogrid: Remember the displaying text when the drop-down datagrid go to other pages.
* combogrid: The 'setValue' and 'setValues' methods accept a key-value object.
* window: The inline window's mask can auto-stretch its size to fill parent container.
* tabs: The 'showTool' and 'hideTool' methods are available for users to show or hide the tools.
* layout: Allow the user to override the 'cls','headerCls' and 'bodyCls' property values.
* New Plugins
* switchbutton: The switch button with two states:'on' and 'off'.
Version 1.4.2
-------------
* Bug
* treegrid: The column will restore its size to original size after recreating the treegrid. fixed.
* Improvement
* draggable: Add 'delay' property that allows the user to delay the drag operation.
* tree: Add 'filter' property and 'doFilter' method.
* tabs: The 'add' method allows the user to insert a tab panel at a specified index.
* tabs: The user can determine what tab panel can be selected.
* tabs: Add 'justified' and 'narrow' properties.
* layout: Add 'unsplit' and 'split' methods.
* messager: Keyboard navigation features are supported now.
* form: Add 'onChange' event.
* combobox: Add 'queryParams' property.
* slider: Add 'range' property.
* menu: Add 'itemHeight','inline','noline' properties.
* panel: The 'header' property allows the user to customize the panel header.
* menubutton: Add 'hasDownArrow' property.
* New Plugins
* datalist: The plugin to render items in a list.
* navpanel: The root component for the mobile page.
* mobile: The plugin to provide the mobile page stack management and navigation.
Version 1.4.1
-------------
* Bug
* combogrid: The combogrid has different height than other combo components. fixed.
* datagrid: The row element loses some class style value after calling 'updateRow' method. fixed.
* menubutton: Calling 'enable' method on a disabled button can not work well. fixed.
* form: The filebox components in the form do not work correctly after calling 'clear' method. fixed.
* Improvement
* tabs: The 'update' method accepts 'type' option that allows the user to update the header,body,or both.
* panel: Add 'openAnimation','openDuration','closeAnimation' and 'closeDuration' properties to set the animation for opening or closing a panel.
* panel: Add 'footer' property that allows the user to add a footer bar to the bottom of panel.
* datagrid: Calling 'endEdit' method will accept the editing value correctly.
* datagrid: Add 'onBeforeSelect','onBeforeCheck','onBeforeUnselect','onBeforeUncheck' events.
* propertygrid: The user can edit a row by calling 'beginEdit' method.
* datebox: Add 'cloneFrom' method to create the datebox component quickly.
* datetimebox: Add 'cloneFrom' method to create the datetimebox component quickly.
Version 1.4
-------------
* Bug
* menu: The menu should not has a correct height when removed a menu item. fixed.
* datagrid: The 'fitColumns' method does not work normally when the datarid width is too small. fixed.
* Improvement
* The fluid/percentange size is supported now for all easyui components.
* menu: Add 'showItem', 'hideItem' and 'resize' methods.
* menu: Auto resize the height upon the window size.
* menu: Add 'duration' property that allows the user to define duration time in milliseconds to hide menu.
* validatebox: Add 'onBeforeValidate' and 'onValidate' events.
* combo: Extended from textbox now.
* combo: Add 'panelMinWidth','panelMaxWidth','panelMinHeight' and 'panelMaxHeight' properties.
* searchbox: Extended from textbox now.
* tree: The 'getRoot' method will return the top parent node of a specified node if pass a 'nodeEl' parameter.
* tree: Add 'queryParams' property.
* datetimebox: Add 'spinnerWidth' property.
* panel: Add 'doLayout' method to cause the panel to lay out its components.
* panel: Add 'clear' method to clear the panel's content.
* datagrid: The user is allowed to assign percent width to columns.
* form: Add 'ajax','novalidate' and 'queryParams' properties.
* linkbutton: Add 'resize' method.
* New Plugins
* textbox: A enhanced input field that allows users build their form easily.
* datetimespinner: A date and time spinner that allows to pick a specific day.
* filebox: The filebox component represents a file field of the forms.
Version 1.3.6
-------------
* Bug
* treegrid: The 'getChecked' method can not return correct checked rows. fixed.
* tree: The checkbox does not display properly on async tree when 'onlyLeafCheck' property is true. fixed.
* Improvement
* treegrid: All the selecting and checking methods are extended from datagrid component.
* linkbutton: The icon alignment is fully supported, possible values are: 'top','bottom','left','right'.
* linkbutton: Add 'size' property, possible values are: 'small','large'.
* linkbutton: Add 'onClick' event.
* menubutton: Add 'menuAlign' property that allows the user set top level menu alignment.
* combo: Add 'panelAlign' property, possible values are: 'left','right'.
* calendar: The 'formatter','styler' and 'validator' options are available to custom the calendar dates.
* calendar: Add 'onChange' event.
* panel: Add 'method','queryParams' and 'loader' options.
* panel: Add 'onLoadError' event.
* datagrid: Add 'onBeginEdit' event that fires when a row goes into edit mode.
* datagrid: Add 'onEndEdit' event that fires when finishing editing but before destroying editors.
* datagrid: Add 'sort' method and 'onBeforeSortColumn' event.
* datagrid: The 'combogrid' editor has been integrated into datagrid.
* datagrid: Add 'ctrlSelect' property that only allows multi-selection when ctrl+click is used.
* slider: Add 'converter' option that allows users determine how to convert a value to the slider position or the slider position to the value.
* searchbox: Add 'disabled' property.
* searchbox: Add 'disable','enable','clear','reset' methods.
* spinner: Add 'readonly' property, 'readonly' method and 'onChange' event.
Version 1.3.5
-------------
* Bug
* searchbox: The 'searcher' function can not offer 'name' parameter value correctly. fixed.
* combo: The 'isValid' method can not return boolean value. fixed.
* combo: Clicking combo will trigger the 'onHidePanel' event of other combo components that have hidden drop-down panels. fixed.
* combogrid: Some methods can not inherit from combo. fixed.
* Improvement
* datagrid: Improve performance on checking rows.
* menu: Allows to append a menu separator.
* menu: Add 'hideOnUnhover' property to indicate if the menu should be hidden when mouse exits it.
* slider: Add 'clear' and 'reset' methods.
* tabs: Add 'unselect' method that will trigger 'onUnselect' event.
* tabs: Add 'selected' property to specify what tab panel will be opened.
* tabs: The 'collapsible' property of tab panel is supported to determine if the tab panel can be collapsed.
* tabs: Add 'showHeader' property, 'showHeader' and 'hideHeader' methods.
* combobox: The 'disabled' property can be used to disable some items.
* tree: Improve loading performance.
* pagination: The 'layout' property can be used to customize the pagination layout.
* accordion: Add 'unselect' method that will trigger 'onUnselect' event.
* accordion: Add 'selected' and 'multiple' properties.
* accordion: Add 'getSelections' method.
* datebox: Add 'sharedCalendar' property that allows multiple datebox components share one calendar component.
Version 1.3.4
-------------
* Bug
* combobox: The onLoadSuccess event fires when parsing empty local data. fixed.
* form: Calling 'reset' method can not reset datebox field. fixed.
* Improvement
* mobile: The context menu and double click features are supported on mobile devices.
* combobox: The 'groupField' and 'groupFormatter' options are available to display items in groups.
* tree: When append or insert nodes, the 'data' parameter accepts one or more nodes data.
* tree: The 'getChecked' method accepts a single 'state' or an array of 'state'.
* tree: Add 'scrollTo' method.
* datagrid: The 'multiSort' property is added to support multiple column sorting.
* datagrid: The 'rowStyler' and column 'styler' can return CSS class name or inline styles.
* treegrid: Add 'load' method to load data and navigate to the first page.
* tabs: Add 'tabWidth' and 'tabHeight' properties.
* validatebox: The 'novalidate' property is available to indicate whether to perform the validation.
* validatebox: Add 'enableValidation' and 'disableValidation' methods.
* form: Add 'enableValidation' and 'disableValidation' methods.
* slider: Add 'onComplete' event.
* pagination: The 'buttons' property accepts the existing element.
Version 1.3.3
-------------
* Bug
* datagrid: Some style features are not supported by column styler function. fixed.
* datagrid: IE 31 stylesheet limit. fixed.
* treegrid: Some style features are not supported by column styler function. fixed.
* menu: The auto width of menu item displays incorrect in ie6. fixed.
* combo: The 'onHidePanel' event can not fire when clicked outside the combo area. fixed.
* Improvement
* datagrid: Add 'scrollTo' and 'highlightRow' methods.
* treegrid: Enable treegrid to parse data from <tbody> element.
* combo: Add 'selectOnNavigation' and 'readonly' options.
* combobox: Add 'loadFilter' option to allow users to change data format before loading into combobox.
* tree: Add 'onBeforeDrop' callback event.
* validatebox: Dependent on tooltip plugin now, add 'deltaX' property.
* numberbox: The 'filter' options can be used to determine if the key pressed was accepted.
* linkbutton: The group button is available.
* layout: The 'minWidth','maxWidth','minHeight','maxHeight' and 'collapsible' properties are available for region panel.
* New Plugins
* tooltip: Display a popup message when moving mouse over an element.
Version 1.3.2
-------------
* Bug
* datagrid: The loading message window can not be centered when changing the width of datagrid. fixed.
* treegrid: The 'mergeCells' method can not work normally. fixed.
* propertygrid: Calling 'endEdit' method to stop editing a row will cause errors. fixed.
* tree: Can not load empty data when 'lines' property set to true. fixed.
* Improvement
* RTL feature is supported now.
* tabs: Add 'scrollBy' method to scroll the tab header by the specified amount of pixels
* tabs: Add 'toolPosition' property to set tab tools to left or right.
* tabs: Add 'tabPosition' property to define the tab position, possible values are: 'top','bottom','left','right'.
* datagrid: Add a column level property 'order' that allows users to define different default sort order per column.
* datagrid: Add a column level property 'halign' that allows users to define how to align the column header.
* datagrid: Add 'resizeHandle' property to define the resizing column position, by grabbing the left or right edge of the column.
* datagrid: Add 'freezeRow' method to freeze some rows that will always be displayed at the top when the datagrid is scrolled down.
* datagrid: Add 'clearChecked' method to clear all checked records.
* datagrid: Add 'data' property to initialize the datagrid data.
* linkbutton: Add 'iconAlgin' property to define the icon position, supported values are: 'left','right'.
* menu: Add 'minWidth' property.
* menu: The menu width can be automatically calculated.
* tree: New events are available including 'onBeforeDrag','onStartDrag','onDragEnter','onDragOver','onDragLeave',etc.
* combo: Add 'height' property to allow users to define the height of combo.
* combo: Add 'reset' method.
* numberbox: Add 'reset' method.
* spinner: Add 'reset' method.
* spinner: Add 'height' property to allow users to define the height of spinner.
* searchbox: Add 'height' property to allow users to define the height of searchbox.
* form: Add 'reset' method.
* validatebox: Add 'delay' property to delay validating from the last inputting value.
* validatebox: Add 'tipPosition' property to define the tip position, supported values are: 'left','right'.
* validatebox: Multiple validate rules on a field is supported now.
* slider: Add 'reversed' property to determine if the min value and max value will switch their positions.
* progressbar: Add 'height' property to allow users to define the height of progressbar.
Version 1.3.1
-------------
* Bug
* datagrid: Setting the 'pageNumber' property is not valid. fixed.
* datagrid: The id attribute of rows isn't adjusted properly while calling 'insertRow' or 'deleteRow' method.
* dialog: When load content from 'href', the script will run twice. fixed.
* propertygrid: The editors that extended from combo can not accept its changed value. fixed.
* Improvement
* droppable: Add 'disabled' property.
* droppable: Add 'options','enable' and 'disable' methods.
* tabs: The tab panel tools can be changed by calling 'update' method.
* messager: When show a message window, the user can define the window position by applying 'style' property.
* window: Prevent script on window body from running twice.
* window: Add 'hcenter','vcenter' and 'center' methods.
* tree: Add 'onBeforeCheck' callback event.
* tree: Extend the 'getChecked' method to allow users to get 'checked','unchecked' or 'indeterminate' nodes.
* treegrid: Add 'update' method to update a specified node.
* treegrid: Add 'insert' method to insert a new node.
* treegrid: Add 'pop' method to remove a node and get the removed node data.
Version 1.3
-----------
* Bug
* combogrid: When set to 'remote' query mode, the 'queryParams' parameters can't be sent to server. fixed.
* combotree: The tree nodes on drop-down panel can not be unchecked while calling 'clear' method. fixed.
* datetimebox: Setting 'showSeconds' property to false cannot hide seconds info. fixed.
* datagrid: Calling 'mergeCells' method can't auto resize the merged cell while header is hidden. fixed.
* dialog: Set cache to false and load data via ajax, the content cannot be refreshed. fixed.
* Improvement
* The HTML5 'data-options' attribute is available for components to declare all custom options, including properties and events.
* More detailed documentation is available.
* panel: Prevent script on panel body from running twice.
* accordion: Add 'getPanelIndex' method.
* accordion: The tools can be added on panel header.
* datetimebox: Add 'timeSeparator' option that allows users to define the time separator.
* pagination: Add 'refresh' and 'select' methods.
* datagrid: Auto resize the column width to fit the contents when the column width is not defined.
* datagrid: Double click on the right border of columns to auto resize the columns to the contents in the columns.
* datagrid: Add 'autoSizeColumn' method that allows users to adjust the column width to fit the contents.
* datagrid: Add 'getChecked' method to get all rows where the checkbox has been checked.
* datagrid: Add 'selectOnCheck' and 'checkOnSelect' properties and some checking methods to enhance the row selections.
* datagrid: Add 'pagePosition' property to allow users to display pager bar at either top,bottom or both places of the grid.
* datagrid: The buffer view and virtual scroll view are supported to display large amounts of records without pagination.
* tabs: Add 'disableTab' and 'enableTab' methods to allow users to disable or enable a tab panel.
Version 1.2.6
-------------
* Bug
* tabs: Call 'add' method with 'selected:false' option, the added tab panel is always selected. fixed.
* treegrid: The 'onSelect' and 'onUnselect' events can't be triggered. fixed.
* treegrid: Cannot display zero value field. fixed.
* Improvement
* propertygrid: Add 'expandGroup' and 'collapseGroup' methods.
* layout: Allow users to create collapsed layout panels by assigning 'collapsed' property to true.
* layout: Add 'add' and 'remove' methods that allow users to dynamically add or remove region panel.
* layout: Additional tool icons can be added on region panel header.
* calendar: Add 'firstDay' option that allow users to set first day of week. Sunday is 0, Monday is 1, ...
* tree: Add 'lines' option, true to display tree lines.
* tree: Add 'loadFilter' option that allow users to change data format before loading into the tree.
* tree: Add 'loader' option that allow users to define how to load data from remote server.
* treegrid: Add 'onClickCell' and 'onDblClickCell' callback function options.
* datagrid: Add 'autoRowHeight' property that allow users to determine if set the row height based on the contents of that row.
* datagrid: Improve performance to load large data set.
* datagrid: Add 'loader' option that allow users to define how to load data from remote server.
* treegrid: Add 'loader' option that allow users to define how to load data from remote server.
* combobox: Add 'onBeforeLoad' callback event function.
* combobox: Add 'loader' option that allow users to define how to load data from remote server.
* Add support for other loading mode such as dwr,xml,etc.
* New Plugins
* slider: Allows the user to choose a numeric value from a finite range.
Version 1.2.5
-------------
* Bug
* tabs: When add a new tab panel with href property, the content page is loaded twice. fixed.
* form: Failed to call 'load' method to load form input with complex name. fixed.
* draggable: End drag in ie9, the cursor cannot be restored. fixed.
* Improvement
* panel: The tools can be defined via html markup.
* tabs: Call 'close' method to close specified tab panel, users can pass tab title or index of tab panel. Other methods such 'select','getTab' and 'exists' are similar to 'close' method.
* tabs: Add 'getTabIndex' method.
* tabs: Users can define mini tools on tabs.
* tree: The mouse must move a specified distance to begin drag and drop operation.
* resizable: Add 'options','enable' and 'disable' methods.
* numberbox: Allow users to change number format.
* datagrid: The subgrid is supported now.
* searchbox: Add 'selectName' method to select searching type name.
Version 1.2.4
-------------
* Bug
* menu: The menu position is wrong when scroll bar appears. fixed.
* accordion: Cannot display the default selected panel in jQuery 1.6.2. fixed.
* tabs: Cannot display the default selected tab panel in jQuery 1.6.2. fixed.
* Improvement
* menu: Allow users to disable or enable menu item.
* combo: Add 'delay' property to set the delay time to do searching from the last key input event.
* treegrid: The 'getEditors' and 'getEditor' methods are supported now.
* treegrid: The 'loadFilter' option is supported now.
* messager: Add 'progress' method to display a message box with a progress bar.
* panel: Add 'extractor' option to allow users to extract panel content from ajax response.
* New Plugins
* searchbox: Allow users to type words into box and do searching operation.
* progressbar: To display the progress of a task.
Version 1.2.3
-------------
* Bug
* window: Cannot resize the window with iframe content. fixed.
* tree: The node will be removed when dragging to its child. fixed.
* combogrid: The onChange event fires multiple times. fixed.
* accordion: Cannot add batch new panels when animate property is set to true. fixed.
* Improvement
* treegrid: The footer row and row styler features are supported now.
* treegrid: Add 'getLevel','reloadFooter','getFooterRows' methods.
* treegrid: Support root nodes pagination and editable features.
* datagrid: Add 'getFooterRows','reloadFooter','insertRow' methods and improve editing performance.
* datagrid: Add 'loadFilter' option that allow users to change original source data to standard data format.
* draggable: Add 'onBeforeDrag' callback event function.
* validatebox: Add 'remote' validation type.
* combobox: Add 'method' option.
* New Plugins
* propertygrid: Allow users to edit property value in datagrid.
Version 1.2.2
-------------
* Bug
* datagrid: Apply fitColumns cannot work fine while set checkbox column. fixed.
* datagrid: The validateRow method cannot return boolean type value. fixed.
* numberbox: Cannot fix value in chrome when min or max property isn't defined. fixed.
* Improvement
* menu: Add some crud methods.
* combo: Add hasDownArrow property to determine whether to display the down arrow button.
* tree: Supports inline editing.
* calendar: Add some useful methods such as 'resize', 'moveTo' etc.
* timespinner: Add some useful methods.
* datebox: Refactoring based on combo and calendar plugin now.
* datagrid: Allow users to change row style in some conditions.
* datagrid: Users can use the footer row to display summary information.
* New Plugins
* datetimebox: Combines datebox with timespinner component.
Version 1.2.1
-------------
* Bug
* easyloader: Some dependencies cannot be loaded by their order. fixed.
* tree: The checkbox is setted incorrectly when removing a node. fixed.
* dialog: The dialog layout incorrectly when 'closed' property is setted to true. fixed.
* Improvement
* parser: Add onComplete callback function that can indicate whether the parse action is complete.
* menu: Add onClick callback function and some other methods.
* tree: Add some useful methods.
* tree: Drag and Drop feature is supported now.
* tree: Add onContextMenu callback function.
* tabs: Add onContextMenu callback function.
* tabs: Add 'tools' property that can create buttons on right bar.
* datagrid: Add onHeaderContextMenu and onRowContextMenu callback functions.
* datagrid: Custom view is supported.
* treegrid: Add onContextMenu callback function and append,remove methods.
Version 1.2
-------------
* Improvement
* tree: Add cascadeCheck,onlyLeafCheck properties and select event.
* combobox: Enable multiple selection.
* combotree: Enable multiple selection.
* tabs: Remember the trace of selection, when current tab panel is closed, the previous selected tab will be selected.
* datagrid: Extend from panel, so many properties defined in panel can be used for datagrid.
* New Plugins
* treegrid: Represent tabular data in hierarchical view, combines tree view and datagrid.
* combo: The basic component that allow user to extend their combo component such as combobox,combotree,etc.
* combogrid: Combines combobox with drop-down datagrid component.
* spinner: The basic plugin to create numberspinner,timespinner,etc.
* numberspinner: The numberbox that allow user to change value by clicking up and down spin buttons.
* timespinner: The time selector that allow user to quickly inc/dec a time.
Version 1.1.2
-------------
* Bug
* messager: When call show method in layout, the message window will be blocked. fixed.
* Improvement
* datagrid: Add validateRow method, remember the current editing row status when do editing action.
* datagrid: Add the ability to create merged cells.
* form: Add callback functions when loading data.
* panel,window,dialog: Add maximize,minimize,restore,collapse,expand methods.
* panel,tabs,accordion: The lazy loading feature is supported.
* tabs: Add getSelected,update,getTab methods.
* accordion: Add crud methods.
* linkbutton: Accept an id option to set the id attribute.
* tree: Enhance tree node operation.
Version 1.1.1
-------------
* Bug
* form: Cannot clear the value of combobox and combotree component. fixed.
* Improvement
* tree: Add some useful methods such as 'getRoot','getChildren','update',etc.
* datagrid: Add editable feature, improve performance while loading data.
* datebox: Add destroy method.
* combobox: Add destroy and clear method.
* combotree: Add destroy and clear method.
Version 1.1
-------------
* Bug
* messager: When call show method with timeout property setted, an error occurs while clicking the close button. fixed.
* combobox: The editable property of combobox plugin is invalid. fixed.
* window: The proxy box will not be removed when dragging or resizing exceed browser border in ie. fixed.
* Improvement
* menu: The menu item can use <a> markup to display a different page.
* tree: The tree node can use <a> markup to act as a tree menu.
* pagination: Add some event on refresh button and page list.
* datagrid: Add a 'param' parameter for reload method, with which users can pass query parameter when reload data.
* numberbox: Add required validation support, the usage is same as validatebox plugin.
* combobox: Add required validation support.
* combotree: Add required validation support.
* layout: Add some method that can get a region panel and attach event handlers.
* New Plugins
* droppable: A droppable plugin that supports drag drop operation.
* calendar: A calendar plugin that can either be embedded within a page or popup.
* datebox: Combines a textbox with a calendar that let users to select date.
* easyloader: A JavaScript loader that allows you to load plugin and their dependencies into your page.
Version 1.0.5
* Bug
* panel: The fit property of panel performs incorrectly. fixed.
* Improvement
* menu: Add a href attribute for menu item, with which user can display a different page in the current browser window.
* form: Add a validate method to do validation for validatebox component.
* dialog: The dialog can read collapsible,minimizable,maximizable and resizable attribute from markup.
* New Plugins
* validatebox: A validation plugin that checks to make sure the user's input value is valid.
Version 1.0.4
-------------
* Bug
* panel: When panel is invisible, it is abnormal when resized. fixed.
* panel: Memory leak in method 'destroy'. fixed.
* messager: Memory leak when messager box is closed. fixed.
* dialog: No onLoad event occurs when loading remote data. fixed.
* Improvement
* panel: Add method 'setTitle'.
* window: Add method 'setTitle'.
* dialog: Add method 'setTitle'.
* combotree: Add method 'getValue'.
* combobox: Add method 'getValue'.
* form: The 'load' method can load data and fill combobox and combotree field correctly.
Version 1.0.3
-------------
* Bug
* menu: When menu is show in a DIV container, it will be cropped. fixed.
* layout: If you collpase a region panel and then expand it immediately, the region panel will not show normally. fixed.
* accordion: If no panel selected then the first one will become selected and the first panel's body height will not set correctly. fixed.
* Improvement
* tree: Add some methods to support CRUD operation.
* datagrid: Toolbar can accept a new property named 'disabled' to disable the specified tool button.
* New Plugins
* combobox: Combines a textbox with a list of options that users are able to choose from.
* combotree: Combines combobox with drop-down tree component.
* numberbox: Make input element can only enter number char.
* dialog: rewrite the dialog plugin, dialog can contains toolbar and buttons.

View File

@ -0,0 +1,404 @@
$.extend($.fn.datagrid.defaults, {
onBeforeFetch: function(page){},
onFetch: function(page, rows){}
});
var bufferview = $.extend({}, $.fn.datagrid.defaults.view, {
onAfterRender : function(target){
},
render: function(target, container, frozen){
var state = $.data(target, 'datagrid');
var opts = state.options;
var rows = this.rows || [];
if (!rows.length) {
return;
}
var fields = $(target).datagrid('getColumnFields', frozen);
if (frozen){
if (!(opts.rownumbers || (opts.frozenColumns && opts.frozenColumns.length))){
return;
}
}
var index = parseInt(opts.finder.getTr(target,'','last',(frozen?1:2)).attr('datagrid-row-index'))+1 || 0;
if(index >= state.data.total){
return;
}
var table = ['<table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0"><tbody>'];
for(var i=0; i<rows.length; i++) {
// get the class and style attributes for this row
var css = opts.rowStyler ? opts.rowStyler.call(target, index, rows[i]) : '';
var classValue = '';
var styleValue = '';
if (typeof css == 'string'){
styleValue = css;
} else if (css){
classValue = css['class'] || '';
styleValue = css['style'] || '';
}
var cls = 'class="datagrid-row ' + (index % 2 && opts.striped ? 'datagrid-row-alt ' : ' ') + classValue + '"';
var style = styleValue ? 'style="' + styleValue + '"' : '';
var rowId = state.rowIdPrefix + '-' + (frozen?1:2) + '-' + index;
table.push('<tr id="' + rowId + '" datagrid-row-index="' + index + '" ' + cls + ' ' + style + '>');
table.push(this.renderRow.call(this, target, fields, frozen, index, rows[i]));
table.push('</tr>');
// render the detail row
if (opts.detailFormatter){
table.push('<tr style="display:none;">');
if (frozen){
table.push('<td colspan=' + (fields.length+2) + ' style="border-right:0">');
} else {
table.push('<td colspan=' + (fields.length) + '>');
}
table.push('<div class="datagrid-row-detail">');
if (frozen){
table.push('&nbsp;');
} else {
table.push(opts.detailFormatter.call(target, index, rows[i]));
}
table.push('</div>');
table.push('</td>');
table.push('</tr>');
}
index++;
}
table.push('</tbody></table>');
$(container).append(table.join(''));
},
renderRow : function(target, fields, frozen, rowIndex, rowData) { //method backup from the source
var opts = $.data(target, "datagrid").options,
cc = [],
rowSpanField = typeof opts.columns[0]['rowSpanField'] !== 'undefined' ? opts.columns[0]['rowSpanField'] : '',
rowSpan = rowSpanField !== '' && typeof rowData[rowSpanField]['numRows'] !== 'undefined' ? rowData[rowSpanField]['numRows'] : 1;
if (frozen && opts.rownumbers) {
var _726 = rowIndex + 1;
if (opts.pagination) {
_726 += (opts.pageNumber - 1) * opts.pageSize;
}
cc.push("<td class=\"datagrid-td-rownumber\"><div class=\"datagrid-cell-rownumber\">" + _726 + "</div></td>");
}
for (var i = 0; i < fields.length; i++) {
var _727 = fields[i];
var col = $(target).datagrid("getColumnOption", _727);
if (col) {
var _728 = rowData[_727];
var css = col.styler ? (col.styler(_728, rowData, rowIndex, col) || "") : "";
var _729 = "";
var _72a = "";
if (typeof css == "string") {
_72a = css;
} else {
if (css) {
_729 = css["class"] || "";
_72a = css["style"] || "";
}
}
var cls = _729 ? "class=\"" + _729 + ( frozen ? 'frozen-td' : '' ) + "\"" : ( frozen ? 'class="frozen-td"' : '' );
var _72b = col.hidden ? "style=\"display:none;" + _72a + "\"" : (_72a ? "style=\"" + _72a + "\"" : "");
cc.push("<td field=\"" + _727 + "\" " + cls + " " + _72b + ">");
var _72b = "";
if (!col.checkbox) {
if (col.align) {
_72b += "text-align:" + col.align + ";";
}else if (col.expander){
style = "text-align:center;height:16px;";
}
if (!opts.nowrap) {
_72b += "white-space:normal;height:auto;";
} else {
if (opts.autoRowHeight) {
_72b += "height:auto;";
}
}
}
cc.push("<div style=\"" + _72b + "\" ");
cc.push(col.checkbox ? "class=\"datagrid-cell-check\"" : "class=\"datagrid-cell " + col.cellClass + "\"");
cc.push(">");
if (col.checkbox) {
cc.push("<input type=\"checkbox\" " + (rowData.checked ? "checked=\"checked\"" : ""));
cc.push(" name=\"" + _727 + "\" value=\"" + (_728 != undefined ? _728 : "") + "\">");
}else if (col.expander) {
//cc.push('<div style="text-align:center;width:16px;height:16px;">');
cc.push('<span class="datagrid-row-expander datagrid-row-expand" style="display:inline-block;width:16px;height:16px;cursor:pointer;" />');
//cc.push('</div>');
} else if (col.formatter){
// console.log('bufferview.renderRow():', col);
cc.push(col.formatter(_728, rowData, rowIndex));
// cc.push(col.formatter(_728, rowData, rowIndex, col));
} else {
cc.push(_728);
}
cc.push("</div>");
cc.push("</td>");
}
}
return cc.join("");
},
bindEvents: function(target){
var state = $.data(target, 'datagrid');
var dc = state.dc;
var opts = state.options;
var body = dc.body1.add(dc.body2);
var clickHandler = ($.data(body[0],'events')||$._data(body[0],'events')).click[0].handler;
body.unbind('click').bind('click', function(e){
var tt = $(e.target);
var tr = tt.closest('tr.datagrid-row');
if (!tr.length){return}
if (tt.hasClass('datagrid-row-expander')){
var rowIndex = parseInt(tr.attr('datagrid-row-index'));
if (tt.hasClass('datagrid-row-expand')){
$(target).datagrid('expandRow', rowIndex);
} else {
$(target).datagrid('collapseRow', rowIndex);
}
$(target).datagrid('fixRowHeight');
} else {
clickHandler(e);
}
e.stopPropagation();
});
},
onBeforeRender: function(target){
var state = $.data(target, 'datagrid');
var opts = state.options;
var dc = state.dc;
var view = this;
this.renderedCount = 0;
this.rows = [];
dc.body1.add(dc.body2).empty();
init();
createHeaderExpander();
function init(){
// erase the onLoadSuccess event, make sure it can't be triggered
state.onLoadSuccess = opts.onLoadSuccess;
opts.onLoadSuccess = function(){};
setTimeout(function(){
dc.body2.unbind('.datagrid').bind('scroll.datagrid', function(e){
if (state.onLoadSuccess){
opts.onLoadSuccess = state.onLoadSuccess; // restore the onLoadSuccess event
state.onLoadSuccess = undefined;
}
if (view.scrollTimer){
clearTimeout(view.scrollTimer);
}
view.scrollTimer = setTimeout(function(){
scrolling.call(view);
}, 50);
});
dc.body2.triggerHandler('scroll.datagrid');
}, 0);
}
function scrolling(){
if (getDataHeight() < dc.body2.height() && view.renderedCount < state.data.total){
this.getRows.call(this, target, function(rows){
this.rows = rows;
this.populate.call(this, target);
dc.body2.triggerHandler('scroll.datagrid');
});
} else if (dc.body2.scrollTop() >= getDataHeight() - dc.body2.height()){
this.getRows.call(this, target, function(rows){
this.rows = rows;
this.populate.call(this, target);
});
}
}
function getDataHeight(){
var h = 0;
dc.body2.children('table.datagrid-btable').each(function(){
h += $(this).outerHeight();
});
if (!h){
h = view.renderedCount * 25;
}
return h;
}
function createHeaderExpander(){
if (!opts.detailFormatter){return}
var t = $(target);
var hasExpander = false;
var fields = t.datagrid('getColumnFields',true).concat(t.datagrid('getColumnFields'));
for(var i=0; i<fields.length; i++){
var col = t.datagrid('getColumnOption', fields[i]);
if (col.expander){
hasExpander = true;
break;
}
}
if (!hasExpander){
if (opts.frozenColumns && opts.frozenColumns.length){
opts.frozenColumns[0].splice(0,0,{field:'_expander',expander:true,width:24,resizable:false,fixed:true});
} else {
opts.frozenColumns = [[{field:'_expander',expander:true,width:24,resizable:false,fixed:true}]];
}
var t = dc.view1.children('div.datagrid-header').find('table');
var td = $('<td rowspan="'+opts.frozenColumns.length+'"><div class="datagrid-header-expander" style="width:24px;"></div></td>');
if ($('tr',t).length == 0){
td.wrap('<tr></tr>').parent().appendTo($('tbody',t));
} else if (opts.rownumbers){
td.insertAfter(t.find('td:has(div.datagrid-header-rownumber)'));
} else {
td.prependTo(t.find('tr:first'));
}
}
setTimeout(function(){
view.bindEvents(target);
},0);
}
},
getRows: function(target, callback){
var state = $.data(target, 'datagrid');
var opts = state.options;
var page = Math.floor(this.renderedCount/opts.pageSize) + 1;
if (this.renderedCount >= state.data.total){return;}
if (opts.onBeforeFetch.call(target, page) == false){return}
var index = (page-1)*opts.pageSize;
var rows = state.data.rows.slice(index, index+opts.pageSize);
if (rows.length){
opts.onFetch.call(target, page, rows);
callback.call(this, rows);
} else {
var param = $.extend({}, opts.queryParams, {
page: Math.floor(this.renderedCount/opts.pageSize)+1,
rows: opts.pageSize
});
if (opts.sortName){
$.extend(param, {
sort: opts.sortName,
order: opts.sortOrder
});
}
if (opts.onBeforeLoad.call(target, param) == false){return;}
$(target).datagrid('loading');
var result = opts.loader.call(target, param, function(data){
$(target).datagrid('loaded');
var data = opts.loadFilter.call(target, data);
opts.onFetch.call(target, page, data.rows);
if (data.rows && data.rows.length){
state.data.rows = state.data.rows.concat(data.rows);
callback.call(opts.view, data.rows);
} else {
opts.onLoadSuccess.call(target, data);
}
}, function(){
$(target).datagrid('loaded');
opts.onLoadError.apply(target, arguments);
});
if (result == false){
$(target).datagrid('loaded');
if (!state.data.rows.length){
opts.onFetch.call(target, page, state.data.rows);
opts.onLoadSuccess.call(target, state.data);
}
}
}
},
populate: function(target){
var state = $.data(target, 'datagrid');
var opts = state.options;
var dc = state.dc;
if (this.rows.length){
this.renderedCount += this.rows.length;
this.render.call(this, target, dc.body2, false);
this.render.call(this, target, dc.body1, true);
opts.onLoadSuccess.call(target, {
total: state.data.total,
rows: this.rows
});
}
}
});
$.extend($.fn.datagrid.methods, {
fixDetailRowHeight: function(jq, index){
return jq.each(function(){
var opts = $.data(this, 'datagrid').options;
var dc = $.data(this, 'datagrid').dc;
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
// fix the detail row height
if (tr2.is(':visible')){
tr1.css('height', '');
tr2.css('height', '');
var height = Math.max(tr1.height(), tr2.height());
tr1.css('height', height);
tr2.css('height', height);
}
dc.body2.triggerHandler('scroll');
});
},
getExpander: function(jq, index){ // get row expander object
var opts = $.data(jq[0], 'datagrid').options;
return opts.finder.getTr(jq[0], index).find('span.datagrid-row-expander');
},
// get row detail container
getRowDetail: function(jq, index){
var opts = $.data(jq[0], 'datagrid').options;
var tr = opts.finder.getTr(jq[0], index, 'body', 2);
return tr.next().find('div.datagrid-row-detail');
},
expandRow: function(jq, index){
return jq.each(function(){
var opts = $(this).datagrid('options');
var dc = $.data(this, 'datagrid').dc;
var expander = $(this).datagrid('getExpander', index);
if (expander.hasClass('datagrid-row-expand')){
expander.removeClass('datagrid-row-expand').addClass('datagrid-row-collapse');
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
tr1.show();
tr2.show();
$(this).datagrid('fixDetailRowHeight', index);
if (opts.onExpandRow){
var row = $(this).datagrid('getRows')[index];
opts.onExpandRow.call(this, index, row);
}
}
});
},
collapseRow: function(jq, index){
return jq.each(function(){
var opts = $(this).datagrid('options');
var dc = $.data(this, 'datagrid').dc;
var expander = $(this).datagrid('getExpander', index);
if (expander.hasClass('datagrid-row-collapse')){
expander.removeClass('datagrid-row-collapse').addClass('datagrid-row-expand');
var tr1 = opts.finder.getTr(this, index, 'body', 1).next();
var tr2 = opts.finder.getTr(this, index, 'body', 2).next();
tr1.hide();
tr2.hide();
dc.body2.triggerHandler('scroll');
if (opts.onCollapseRow){
var row = $(this).datagrid('getRows')[index];
opts.onCollapseRow.call(this, index, row);
}
}
});
}
});

194
static/jeasyui/easyloader.js Executable file
View File

@ -0,0 +1,194 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function(){
var _1={draggable:{js:"jquery.draggable.js"},droppable:{js:"jquery.droppable.js"},resizable:{js:"jquery.resizable.js"},linkbutton:{js:"jquery.linkbutton.js",css:"linkbutton.css"},progressbar:{js:"jquery.progressbar.js",css:"progressbar.css"},tooltip:{js:"jquery.tooltip.js",css:"tooltip.css"},pagination:{js:"jquery.pagination.js",css:"pagination.css",dependencies:["linkbutton"]},datagrid:{js:"jquery.datagrid.js",css:"datagrid.css",dependencies:["panel","resizable","linkbutton","pagination"]},treegrid:{js:"jquery.treegrid.js",css:"tree.css",dependencies:["datagrid"]},propertygrid:{js:"jquery.propertygrid.js",css:"propertygrid.css",dependencies:["datagrid"]},datalist:{js:"jquery.datalist.js",css:"datalist.css",dependencies:["datagrid"]},panel:{js:"jquery.panel.js",css:"panel.css"},window:{js:"jquery.window.js",css:"window.css",dependencies:["resizable","draggable","panel"]},dialog:{js:"jquery.dialog.js",css:"dialog.css",dependencies:["linkbutton","window"]},messager:{js:"jquery.messager.js",css:"messager.css",dependencies:["linkbutton","dialog","progressbar"]},layout:{js:"jquery.layout.js",css:"layout.css",dependencies:["resizable","panel"]},form:{js:"jquery.form.js"},menu:{js:"jquery.menu.js",css:"menu.css"},tabs:{js:"jquery.tabs.js",css:"tabs.css",dependencies:["panel","linkbutton"]},menubutton:{js:"jquery.menubutton.js",css:"menubutton.css",dependencies:["linkbutton","menu"]},splitbutton:{js:"jquery.splitbutton.js",css:"splitbutton.css",dependencies:["menubutton"]},switchbutton:{js:"jquery.switchbutton.js",css:"switchbutton.css"},accordion:{js:"jquery.accordion.js",css:"accordion.css",dependencies:["panel"]},calendar:{js:"jquery.calendar.js",css:"calendar.css"},textbox:{js:"jquery.textbox.js",css:"textbox.css",dependencies:["validatebox","linkbutton"]},passwordbox:{js:"jquery.passwordbox.js",css:"passwordbox.css",dependencies:["textbox"]},filebox:{js:"jquery.filebox.js",css:"filebox.css",dependencies:["textbox"]},radiobutton:{js:"jquery.radiobutton.js",css:"radiobutton.css"},checkbox:{js:"jquery.checkbox.js",css:"checkbox.css"},sidemenu:{js:"jquery.sidemenu.js",css:"sidemenu.css",dependencies:["accordion","tree","tooltip"]},combo:{js:"jquery.combo.js",css:"combo.css",dependencies:["panel","textbox"]},combobox:{js:"jquery.combobox.js",css:"combobox.css",dependencies:["combo"]},combotree:{js:"jquery.combotree.js",dependencies:["combo","tree"]},combogrid:{js:"jquery.combogrid.js",dependencies:["combo","datagrid"]},combotreegrid:{js:"jquery.combotreegrid.js",dependencies:["combo","treegrid"]},tagbox:{js:"jquery.tagbox.js",dependencies:["combobox"]},validatebox:{js:"jquery.validatebox.js",css:"validatebox.css",dependencies:["tooltip"]},numberbox:{js:"jquery.numberbox.js",dependencies:["textbox"]},searchbox:{js:"jquery.searchbox.js",css:"searchbox.css",dependencies:["menubutton","textbox"]},spinner:{js:"jquery.spinner.js",css:"spinner.css",dependencies:["textbox"]},numberspinner:{js:"jquery.numberspinner.js",dependencies:["spinner","numberbox"]},timespinner:{js:"jquery.timespinner.js",dependencies:["spinner"]},timepicker:{js:"jquery.timepicker.js",css:"timepicker.css",dependencies:["combo"]},tree:{js:"jquery.tree.js",css:"tree.css",dependencies:["draggable","droppable"]},datebox:{js:"jquery.datebox.js",css:"datebox.css",dependencies:["calendar","combo"]},datetimebox:{js:"jquery.datetimebox.js",dependencies:["datebox","timespinner"]},slider:{js:"jquery.slider.js",dependencies:["draggable"]},parser:{js:"jquery.parser.js",css:"flex.css"},mobile:{js:"jquery.mobile.js"}};
var _2={"af":"easyui-lang-af.js","ar":"easyui-lang-ar.js","bg":"easyui-lang-bg.js","ca":"easyui-lang-ca.js","cs":"easyui-lang-cs.js","cz":"easyui-lang-cz.js","da":"easyui-lang-da.js","de":"easyui-lang-de.js","el":"easyui-lang-el.js","en":"easyui-lang-en.js","es":"easyui-lang-es.js","fr":"easyui-lang-fr.js","it":"easyui-lang-it.js","jp":"easyui-lang-jp.js","nl":"easyui-lang-nl.js","pl":"easyui-lang-pl.js","pt_BR":"easyui-lang-pt_BR.js","ru":"easyui-lang-ru.js","sv_SE":"easyui-lang-sv_SE.js","tr":"easyui-lang-tr.js","zh_CN":"easyui-lang-zh_CN.js","zh_TW":"easyui-lang-zh_TW.js"};
var _3={};
function _4(_5,_6){
var _7=false;
var _8=document.createElement("script");
_8.type="text/javascript";
_8.language="javascript";
_8.src=_5;
_8.onload=_8.onreadystatechange=function(){
if(!_7&&(!_8.readyState||_8.readyState=="loaded"||_8.readyState=="complete")){
_7=true;
_8.onload=_8.onreadystatechange=null;
if(_6){
_6.call(_8);
}
}
};
document.getElementsByTagName("head")[0].appendChild(_8);
};
function _9(_a,_b){
_4(_a,function(){
document.getElementsByTagName("head")[0].removeChild(this);
if(_b){
_b();
}
});
};
function _c(_d,_e){
var _f=document.createElement("link");
_f.rel="stylesheet";
_f.type="text/css";
_f.media="screen";
_f.href=_d;
document.getElementsByTagName("head")[0].appendChild(_f);
if(_e){
_e.call(_f);
}
};
function _10(_11,_12){
_3[_11]="loading";
var _13=_1[_11];
var _14="loading";
var _15=(easyloader.css&&_13["css"])?"loading":"loaded";
if(easyloader.css&&_13["css"]){
if(/^http/i.test(_13["css"])){
var url=_13["css"];
}else{
var url=easyloader.base+"themes/"+easyloader.theme+"/"+_13["css"];
}
_c(url,function(){
_15="loaded";
if(_14=="loaded"&&_15=="loaded"){
_16();
}
});
}
if(/^http/i.test(_13["js"])){
var url=_13["js"];
}else{
var url=easyloader.base+"plugins/"+_13["js"];
}
_4(url,function(){
_14="loaded";
if(_14=="loaded"&&_15=="loaded"){
_16();
}
});
function _16(){
_3[_11]="loaded";
easyloader.onProgress(_11);
if(_12){
_12();
}
};
};
function _17(_18,_19){
var mm=[];
var _1a=false;
if(typeof _18=="string"){
add(_18);
}else{
for(var i=0;i<_18.length;i++){
add(_18[i]);
}
}
mm.unshift("parser");
function add(_1b){
if(!_1[_1b]){
return;
}
var d=_1[_1b]["dependencies"];
if(d){
for(var i=0;i<d.length;i++){
add(d[i]);
}
}
mm.push(_1b);
};
function _1c(){
if(_19){
if(window.jQuery){
window.jQuery.parser.parseVars();
}
_19();
}
easyloader.onLoad(_18);
};
var _1d=0;
function _1e(){
if(mm.length){
var m=mm[0];
if(!_3[m]){
_1a=true;
_10(m,function(){
mm.shift();
_1e();
});
}else{
if(_3[m]=="loaded"){
mm.shift();
_1e();
}else{
if(_1d<easyloader.timeout){
_1d+=10;
setTimeout(arguments.callee,10);
}
}
}
}else{
if(easyloader.locale&&_1a==true&&_2[easyloader.locale]){
var url=easyloader.base+"locale/"+_2[easyloader.locale];
_9(url,function(){
_1c();
});
}else{
_1c();
}
}
};
_1e();
};
easyloader={modules:_1,locales:_2,base:".",theme:"default",css:true,locale:null,timeout:2000,load:function(_1f,_20){
if(/\.css$/i.test(_1f)){
if(/^http/i.test(_1f)){
_c(_1f,_20);
}else{
_c(easyloader.base+_1f,_20);
}
}else{
if(/\.js$/i.test(_1f)){
if(/^http/i.test(_1f)){
_4(_1f,_20);
}else{
_4(easyloader.base+_1f,_20);
}
}else{
_17(_1f,_20);
}
}
},onProgress:function(_21){
},onLoad:function(_22){
}};
var _23=document.getElementsByTagName("script");
for(var i=0;i<_23.length;i++){
var src=_23[i].src;
if(!src){
continue;
}
var m=src.match(/easyloader\.js(\W|$)/i);
if(m){
easyloader.base=src.substring(0,m.index);
}
}
window.using=easyloader.load;
if(window.jQuery){
jQuery(function(){
easyloader.load("parser",function(){
jQuery.parser.parse();
});
});
}
})();

View File

@ -0,0 +1,620 @@
/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
;(function() {
/*jshint eqeqeq:false curly:false latedef:false */
"use strict";
function setup($) {
$.fn._fadeIn = $.fn.fadeIn;
var noOp = $.noop || function() {};
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
// confusing userAgent strings on Vista)
var msie = /MSIE/.test(navigator.userAgent);
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
var mode = document.documentMode || 0;
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
$.growlUI = function(title, message, timeout, onClose) {
var $m = $('<div class="growlUI"></div>');
if (title) $m.append('<h1>'+title+'</h1>');
if (message) $m.append('<h2>'+message+'</h2>');
if (timeout === undefined) timeout = 3000;
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
var callBlock = function(opts) {
opts = opts || {};
$.blockUI({
message: $m,
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
centerY: false,
showOverlay: false,
onUnblock: onClose,
css: $.blockUI.defaults.growlCSS
});
};
callBlock();
var nonmousedOpacity = $m.css('opacity');
$m.mouseover(function() {
callBlock({
fadeIn: 0,
timeout: 30000
});
var displayBlock = $('.blockMsg');
displayBlock.stop(); // cancel fadeout if it has started
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
}).mouseout(function() {
$('.blockMsg').fadeOut(1000);
});
// End konapun additions
};
// plugin method for blocking element content
$.fn.block = function(opts) {
if ( this[0] === window ) {
$.blockUI( opts );
return this;
}
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
this.each(function() {
var $el = $(this);
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
return;
$el.unblock({ fadeOut: 0 });
});
return this.each(function() {
if ($.css(this,'position') == 'static') {
this.style.position = 'relative';
$(this).data('blockUI.static', true);
}
this.style.zoom = 1; // force 'hasLayout' in ie
install(this, opts);
});
};
// plugin method for unblocking element content
$.fn.unblock = function(opts) {
if ( this[0] === window ) {
$.unblockUI( opts );
return this;
}
return this.each(function() {
remove(this, opts);
});
};
$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
// message displayed when blocking (use null for no message)
message: '<h1>Please wait...</h1>',
title: null, // title string; only used when theme == true
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
theme: false, // set to true to use with jQuery UI themes
// styles for the message when blocking; if you wish to disable
// these and use an external stylesheet then do this in your code:
// $.blockUI.defaults.css = {};
css: {
padding: 0,
margin: 0,
width: '30%',
top: '40%',
left: '35%',
textAlign: 'center',
color: '#000',
border: '3px solid #aaa',
backgroundColor:'#fff',
cursor: 'wait'
},
// minimal style set used when themes are used
themedCSS: {
width: '30%',
top: '40%',
left: '35%'
},
// styles for the overlay
overlayCSS: {
backgroundColor: '#000',
opacity: 0.6,
cursor: 'wait'
},
// style to replace wait cursor before unblocking to correct issue
// of lingering wait cursor
cursorReset: 'default',
// styles applied when using $.growlUI
growlCSS: {
width: '350px',
top: '10px',
left: '',
right: '10px',
border: 'none',
padding: '5px',
opacity: 0.6,
cursor: 'default',
color: '#fff',
backgroundColor: '#000',
'-webkit-border-radius':'10px',
'-moz-border-radius': '10px',
'border-radius': '10px'
},
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
// (hat tip to Jorge H. N. de Vasconcelos)
/*jshint scripturl:true */
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
// force usage of iframe in non-IE browsers (handy for blocking applets)
forceIframe: false,
// z-index for the blocking overlay
baseZ: 1000,
// set these to true to have the message automatically centered
centerX: true, // <-- only effects element blocking (page block controlled via css above)
centerY: true,
// allow body element to be stetched in ie6; this makes blocking look better
// on "short" pages. disable if you wish to prevent changes to the body height
allowBodyStretch: true,
// enable if you want key and mouse events to be disabled for content that is blocked
bindEvents: true,
// be default blockUI will supress tab navigation from leaving blocking content
// (if bindEvents is true)
constrainTabKey: true,
// fadeIn time in millis; set to 0 to disable fadeIn on block
fadeIn: 200,
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
fadeOut: 400,
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
timeout: 0,
// disable if you don't want to show the overlay
showOverlay: true,
// if true, focus will be placed in the first available input field when
// page blocking
focusInput: true,
// elements that can receive focus
focusableElements: ':input:enabled:visible',
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
// no longer needed in 2012
// applyPlatformOpacityRules: true,
// callback method invoked when fadeIn has completed and blocking message is visible
onBlock: null,
// callback method invoked when unblocking has completed; the callback is
// passed the element that has been unblocked (which is the window object for page
// blocks) and the options that were passed to the unblock call:
// onUnblock(element, options)
onUnblock: null,
// callback method invoked when the overlay area is clicked.
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
onOverlayClick: null,
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
quirksmodeOffsetHack: 4,
// class name of the message block
blockMsgClass: 'blockMsg',
// if it is already blocked, then ignore it (don't unblock and reblock)
ignoreIfBlocked: false
};
// private data and functions follow...
var pageBlock = null;
var pageBlockEls = [];
function install(el, opts) {
var css, themedCSS;
var full = (el == window);
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
opts = $.extend({}, $.blockUI.defaults, opts || {});
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
return;
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
if (opts.onOverlayClick)
opts.overlayCSS.cursor = 'pointer';
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
msg = msg === undefined ? opts.message : msg;
// remove the current block (if there is one)
if (full && pageBlock)
remove(window, {fadeOut:0});
// if an existing element is being used as the blocking content then we capture
// its current place in the DOM (and current display style) so we can restore
// it when we unblock
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
var node = msg.jquery ? msg[0] : msg;
var data = {};
$(el).data('blockUI.history', data);
data.el = node;
data.parent = node.parentNode;
data.display = node.style.display;
data.position = node.style.position;
if (data.parent)
data.parent.removeChild(node);
}
$(el).data('blockUI.onUnblock', opts.onUnblock);
var z = opts.baseZ;
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
// layer1 is the iframe layer which is used to supress bleed through of underlying content
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
// layer3 is the message content that is displayed while blocking
var lyr1, lyr2, lyr3, s;
if (msie || opts.forceIframe)
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
else
lyr1 = $('<div class="blockUI" style="display:none"></div>');
if (opts.theme)
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
else
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
if (opts.theme && full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (opts.theme) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
}
else {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
lyr3 = $(s);
// if we have a message, style it
if (msg) {
if (opts.theme) {
lyr3.css(themedCSS);
lyr3.addClass('ui-widget-content');
}
else
lyr3.css(css);
}
// style the overlay
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
lyr2.css(opts.overlayCSS);
lyr2.css('position', full ? 'fixed' : 'absolute');
// make iframe layer transparent in IE
if (msie || opts.forceIframe)
lyr1.css('opacity',0.0);
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
$.each(layers, function() {
this.appendTo($par);
});
if (opts.theme && opts.draggable && $.fn.draggable) {
lyr3.draggable({
handle: '.ui-dialog-titlebar',
cancel: 'li'
});
}
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
if (ie6 || expr) {
// give body 100% height
if (full && opts.allowBodyStretch && $.support.boxModel)
$('html,body').css('height','100%');
// fix ie6 issue when blocked element has a border width
if ((ie6 || !$.support.boxModel) && !full) {
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
var fixT = t ? '(0 - '+t+')' : 0;
var fixL = l ? '(0 - '+l+')' : 0;
}
// simulate fixed position
$.each(layers, function(i,o) {
var s = o[0].style;
s.position = 'absolute';
if (i < 2) {
if (full)
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
else
s.setExpression('height','this.parentNode.offsetHeight + "px"');
if (full)
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
else
s.setExpression('width','this.parentNode.offsetWidth + "px"');
if (fixL) s.setExpression('left', fixL);
if (fixT) s.setExpression('top', fixT);
}
else if (opts.centerY) {
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
s.marginTop = 0;
}
else if (!opts.centerY && full) {
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
s.setExpression('top',expression);
}
});
}
// show the message
if (msg) {
if (opts.theme)
lyr3.find('.ui-widget-content').append(msg);
else
lyr3.append(msg);
if (msg.jquery || msg.nodeType)
$(msg).show();
}
if ((msie || opts.forceIframe) && opts.showOverlay)
lyr1.show(); // opacity is zero
if (opts.fadeIn) {
var cb = opts.onBlock ? opts.onBlock : noOp;
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
var cb2 = msg ? cb : noOp;
if (opts.showOverlay)
lyr2._fadeIn(opts.fadeIn, cb1);
if (msg)
lyr3._fadeIn(opts.fadeIn, cb2);
}
else {
if (opts.showOverlay)
lyr2.show();
if (msg)
lyr3.show();
if (opts.onBlock)
opts.onBlock.bind(lyr3)();
}
// bind key and mouse events
bind(1, el, opts);
if (full) {
pageBlock = lyr3[0];
pageBlockEls = $(opts.focusableElements,pageBlock);
if (opts.focusInput)
setTimeout(focus, 20);
}
else
center(lyr3[0], opts.centerX, opts.centerY);
if (opts.timeout) {
// auto-unblock
var to = setTimeout(function() {
if (full)
$.unblockUI(opts);
else
$(el).unblock(opts);
}, opts.timeout);
$(el).data('blockUI.timeout', to);
}
}
// remove the block
function remove(el, opts) {
var count;
var full = (el == window);
var $el = $(el);
var data = $el.data('blockUI.history');
var to = $el.data('blockUI.timeout');
if (to) {
clearTimeout(to);
$el.removeData('blockUI.timeout');
}
opts = $.extend({}, $.blockUI.defaults, opts || {});
bind(0, el, opts); // unbind events
if (opts.onUnblock === null) {
opts.onUnblock = $el.data('blockUI.onUnblock');
$el.removeData('blockUI.onUnblock');
}
var els;
if (full) // crazy selector to handle odd field errors in ie6/7
els = $('body').children().filter('.blockUI').add('body > .blockUI');
else
els = $el.find('>.blockUI');
// fix cursor issue
if ( opts.cursorReset ) {
if ( els.length > 1 )
els[1].style.cursor = opts.cursorReset;
if ( els.length > 2 )
els[2].style.cursor = opts.cursorReset;
}
if (full)
pageBlock = pageBlockEls = null;
if (opts.fadeOut) {
count = els.length;
els.stop().fadeOut(opts.fadeOut, function() {
if ( --count === 0)
reset(els,data,opts,el);
});
}
else
reset(els, data, opts, el);
}
// move blocking element back into the DOM where it started
function reset(els,data,opts,el) {
var $el = $(el);
if ( $el.data('blockUI.isBlocked') )
return;
els.each(function(i,o) {
// remove via DOM calls so we don't lose event handlers
if (this.parentNode)
this.parentNode.removeChild(this);
});
if (data && data.el) {
data.el.style.display = data.display;
data.el.style.position = data.position;
data.el.style.cursor = 'default'; // #59
if (data.parent)
data.parent.appendChild(data.el);
$el.removeData('blockUI.history');
}
if ($el.data('blockUI.static')) {
$el.css('position', 'static'); // #22
}
if (typeof opts.onUnblock == 'function')
opts.onUnblock(el,opts);
// fix issue in Safari 6 where block artifacts remain until reflow
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
body.width(w-1).width(w);
body[0].style.width = cssW;
}
// bind/unbind the handler
function bind(b, el, opts) {
var full = el == window, $el = $(el);
// don't bother unbinding if there is nothing to unbind
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
return;
$el.data('blockUI.isBlocked', b);
// don't bind events when overlay is not in use or if bindEvents is false
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
return;
// bind anchors and inputs for mouse and key events
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
if (b)
$(document).bind(events, opts, handler);
else
$(document).unbind(events, handler);
// former impl...
// var $e = $('a,:input');
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
}
// event handler to suppress keyboard/mouse events when blocking
function handler(e) {
// allow tab navigation (conditionally)
if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
if (pageBlock && e.data.constrainTabKey) {
var els = pageBlockEls;
var fwd = !e.shiftKey && e.target === els[els.length-1];
var back = e.shiftKey && e.target === els[0];
if (fwd || back) {
setTimeout(function(){focus(back);},10);
return false;
}
}
}
var opts = e.data;
var target = $(e.target);
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
opts.onOverlayClick(e);
// allow events within the message content
if (target.parents('div.' + opts.blockMsgClass).length > 0)
return true;
// allow events for content that is not being blocked
return target.parents().children().filter('div.blockUI').length === 0;
}
function focus(back) {
if (!pageBlockEls)
return;
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
if (e)
e.focus();
}
function center(el, x, y) {
var p = el.parentNode, s = el.style;
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
if (x) s.left = l > 0 ? (l+'px') : '0';
if (y) s.top = t > 0 ? (t+'px') : '0';
}
function sz(el, p) {
return parseInt($.css(el,p),10)||0;
}
}
/*global define:true */
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
define(['jquery'], setup);
} else {
setup(jQuery);
}
})();

17707
static/jeasyui/jquery.easyui.min.js vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,141 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
$.fn.navpanel=function(_1,_2){
if(typeof _1=="string"){
var _3=$.fn.navpanel.methods[_1];
return _3?_3(this,_2):this.panel(_1,_2);
}else{
_1=_1||{};
return this.each(function(){
var _4=$.data(this,"navpanel");
if(_4){
$.extend(_4.options,_1);
}else{
_4=$.data(this,"navpanel",{options:$.extend({},$.fn.navpanel.defaults,$.fn.navpanel.parseOptions(this),_1)});
}
$(this).panel(_4.options);
});
}
};
$.fn.navpanel.methods={options:function(jq){
return $.data(jq[0],"navpanel").options;
}};
$.fn.navpanel.parseOptions=function(_5){
return $.extend({},$.fn.panel.parseOptions(_5),$.parser.parseOptions(_5,[]));
};
$.fn.navpanel.defaults=$.extend({},$.fn.panel.defaults,{fit:true,border:false,cls:"navpanel"});
$.parser.plugins.push("navpanel");
})(jQuery);
(function($){
$(function(){
$.mobile.init();
});
$.mobile={defaults:{animation:"slide",direction:"left",reverseDirections:{up:"down",down:"up",left:"right",right:"left"}},panels:[],init:function(_6){
$.mobile.panels=[];
var _7=$(_6||"body").children(".navpanel:visible");
if(_7.length){
_7.not(":first").children(".panel-body").navpanel("close");
var p=_7.eq(0).children(".panel-body");
$.mobile.panels.push({panel:p,animation:$.mobile.defaults.animation,direction:$.mobile.defaults.direction});
}
$(document)._unbind(".mobile")._bind("click.mobile",function(e){
var a=$(e.target).closest("a");
if(a.length){
var _8=$.parser.parseOptions(a[0],["animation","direction",{back:"boolean"}]);
if(_8.back){
$.mobile.back();
e.preventDefault();
}else{
var _9=$.trim(a.attr("href"));
if(/^#/.test(_9)){
var to=$(_9);
if(to.length&&to.hasClass("panel-body")){
$.mobile.go(to,_8.animation,_8.direction);
e.preventDefault();
}
}
}
}
});
$(window)._unbind(".mobile")._bind("hashchange.mobile",function(){
var _a=$.mobile.panels.length;
if(_a>1){
var _b=location.hash;
var p=$.mobile.panels[_a-2];
if(!_b||_b=="#&"+p.panel.attr("id")){
$.mobile._back();
}
}
});
},nav:function(_c,to,_d,_e){
if(window.WebKitAnimationEvent){
_d=_d!=undefined?_d:$.mobile.defaults.animation;
_e=_e!=undefined?_e:$.mobile.defaults.direction;
var _f="m-"+_d+(_e?"-"+_e:"");
var p1=$(_c).panel("open").panel("resize").panel("panel");
var p2=$(to).panel("open").panel("resize").panel("panel");
p1.add(p2)._bind("webkitAnimationEnd",function(){
$(this)._unbind("webkitAnimationEnd");
var p=$(this).children(".panel-body");
if($(this).hasClass("m-in")){
p.panel("open").panel("resize");
}else{
p.panel("close");
}
$(this).removeClass(_f+" m-in m-out");
});
p2.addClass(_f+" m-in");
p1.addClass(_f+" m-out");
}else{
$(to).panel("open").panel("resize");
$(_c).panel("close");
}
},_go:function(_10,_11,_12){
_11=_11!=undefined?_11:$.mobile.defaults.animation;
_12=_12!=undefined?_12:$.mobile.defaults.direction;
var _13=$.mobile.panels[$.mobile.panels.length-1].panel;
var to=$(_10);
if(_13[0]!=to[0]){
$.mobile.nav(_13,to,_11,_12);
$.mobile.panels.push({panel:to,animation:_11,direction:_12});
}
},_back:function(){
if($.mobile.panels.length<2){
return;
}
var p1=$.mobile.panels.pop();
var p2=$.mobile.panels[$.mobile.panels.length-1];
var _14=p1.animation;
var _15=$.mobile.defaults.reverseDirections[p1.direction]||"";
$.mobile.nav(p1.panel,p2.panel,_14,_15);
},go:function(_16,_17,_18){
_17=_17!=undefined?_17:$.mobile.defaults.animation;
_18=_18!=undefined?_18:$.mobile.defaults.direction;
location.hash="#&"+$(_16).attr("id");
$.mobile._go(_16,_17,_18);
},back:function(){
history.go(-1);
}};
$.map(["validatebox","textbox","passwordbox","filebox","searchbox","combo","combobox","combogrid","combotree","combotreegrid","datebox","datetimebox","numberbox","spinner","numberspinner","timespinner","datetimespinner"],function(_19){
if($.fn[_19]){
$.extend($.fn[_19].defaults,{iconWidth:28,tipPosition:"bottom"});
}
});
$.map(["spinner","numberspinner","timespinner","datetimespinner"],function(_1a){
if($.fn[_1a]){
$.extend($.fn[_1a].defaults,{iconWidth:56,spinAlign:"horizontal"});
}
});
if($.fn.menu){
$.extend($.fn.menu.defaults,{itemHeight:30,noline:true});
}
})(jQuery);

2
static/jeasyui/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Bladsy';
$.fn.pagination.defaults.afterPageText = 'Van {pages}';
$.fn.pagination.defaults.displayMsg = 'Wys (from) tot (to) van (total) items';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Verwerking, wag asseblief ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Die styl';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Die veld is verpligtend.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = "Gee 'n geldige e-pos adres.";
$.fn.validatebox.defaults.rules.url.message = "Gee 'n geldige URL nie.";
$.fn.validatebox.defaults.rules.length.message = "Voer 'n waarde tussen {0} en {1}.";
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Vandag';
$.fn.datebox.defaults.closeText = 'Sluit';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,46 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Էջ';
$.fn.pagination.defaults.afterPageText = 'ից {pages}';
$.fn.pagination.defaults.displayMsg = 'Դիտել {from}-ից {to}-ը {total} գրառումից';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Մշակվում է, խնդրում ենք սպասել ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Այո';
$.messager.defaults.cancel = 'Փակել';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Այս դաշտը պարտադիր է.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Խնդրում ենք մուտքագրել գործող e-mail հասցե.';
$.fn.validatebox.defaults.rules.url.message = 'Խնդրում ենք մուտքագրել գործող URL.';
$.fn.validatebox.defaults.rules.length.message = 'Խնդրում ենք մուտքագրել արժեք {0} {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Խնդրում ենք ուղղել այս դաշտը.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.firstDay = 1;
$.fn.calendar.defaults.weeks = ['Կ.','Ե.','Ե.','Չ.','Հ.','Ու.','Շ.'];
$.fn.calendar.defaults.months = ['Հունվար', 'Փետրվար', 'Մարտ', 'Ապրիլ', 'Մայիս', 'Հունիս', 'Հուլիս', 'Օգոստոս', 'Սեպտեմբեր', 'Հոկտեմբեր', 'Նոյեմբեր', 'Դեկտեմբեր'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Այսօր';
$.fn.datebox.defaults.closeText = 'Փակել';
$.fn.datebox.defaults.okText = 'Այո';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'صفحة';
$.fn.pagination.defaults.afterPageText = 'من {pages}';
$.fn.pagination.defaults.displayMsg = 'عرض {from} إلى {to} من {total} عنصر';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'معالجة, الرجاء الإنتظار ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'موافق';
$.messager.defaults.cancel = 'إلغاء';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'هذا الحقل مطلوب.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'الرجاء إدخال بريد إلكتروني صحيح.';
$.fn.validatebox.defaults.rules.url.message = 'الرجاء إدخال رابط صحيح.';
$.fn.validatebox.defaults.rules.length.message = 'الرجاء إدخال قيمة بين {0} و {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'الرجاء التأكد من الحقل.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'اليوم';
$.fn.datebox.defaults.closeText = 'إغلاق';
$.fn.datebox.defaults.okText = 'موافق';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Страница';
$.fn.pagination.defaults.afterPageText = 'от {pages}';
$.fn.pagination.defaults.displayMsg = 'Показани {from} за {to} от {total} продукти';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Обработка, моля изчакайте ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Добре';
$.messager.defaults.cancel = 'Задрасквам';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Това поле е задължително.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Моля, въведете валиден имейл адрес.';
$.fn.validatebox.defaults.rules.url.message = 'Моля въведете валиден URL.';
$.fn.validatebox.defaults.rules.length.message = 'Моля, въведете стойност между {0} и {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Днес';
$.fn.datebox.defaults.closeText = 'Близо';
$.fn.datebox.defaults.okText = 'Добре';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Pàgina';
$.fn.pagination.defaults.afterPageText = 'de {pages}';
$.fn.pagination.defaults.displayMsg = "Veient {from} a {to} de {total} d'articles";
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Elaboració, si us plau esperi ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Cancel';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Aquest camp és obligatori.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Introduïu una adreça de correu electrònic vàlida.';
$.fn.validatebox.defaults.rules.url.message = 'Si us plau, introduïu un URL vàlida.';
$.fn.validatebox.defaults.rules.length.message = 'Si us plau, introduïu un valor entre {0} i {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Avui';
$.fn.datebox.defaults.closeText = 'Tancar';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Strana';
$.fn.pagination.defaults.afterPageText = 'z {pages}';
$.fn.pagination.defaults.displayMsg = 'Zobrazuji {from} do {to} z {total} položky';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Zpracování, čekejte prosím ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Zrušit';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Toto pole je vyžadováno.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Zadejte prosím platnou e-mailovou adresu.';
$.fn.validatebox.defaults.rules.url.message = 'Zadejte prosím platnou adresu URL.';
$.fn.validatebox.defaults.rules.length.message = 'Prosím, zadejte hodnotu mezi {0} a {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Dnes';
$.fn.datebox.defaults.closeText = 'Zavřít';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Strana';
$.fn.pagination.defaults.afterPageText = 'z {pages}';
$.fn.pagination.defaults.displayMsg = 'Zobrazuji záznam {from} až {to} z {total}.';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Pracuji, čekejte prosím…';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Zrušit';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Toto pole je vyžadováno.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Zadejte, prosím, platnou e-mailovou adresu.';
$.fn.validatebox.defaults.rules.url.message = 'Zadejte, prosím, platnou adresu URL.';
$.fn.validatebox.defaults.rules.length.message = 'Zadejte, prosím, hodnotu mezi {0} a {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['N','P','Ú','S','Č','P','S']; //neděle pondělí úterý středa čtvrtek pátek sobota
$.fn.calendar.defaults.months = ['led', 'únr', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro']; //leden únor březen duben květen červen červenec srpen září říjen listopad prosinec
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Dnes';
$.fn.datebox.defaults.closeText = 'Zavřít';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Page';
$.fn.pagination.defaults.afterPageText = 'af {pages}';
$.fn.pagination.defaults.displayMsg = 'Viser {from} til {to} af {total} poster';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Behandling, vent venligst ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Annuller';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Dette felt er påkrævet.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Angiv en gyldig e-mail-adresse.';
$.fn.validatebox.defaults.rules.url.message = 'Angiv en gyldig webadresse.';
$.fn.validatebox.defaults.rules.length.message = 'Angiv en værdi mellem {0} og {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'I dag';
$.fn.datebox.defaults.closeText = 'Luk';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,63 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Seite';
$.fn.pagination.defaults.afterPageText = 'von {pages}';
$.fn.pagination.defaults.displayMsg = '{from} bis {to} von {total} Datensätzen';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Verarbeitung läuft, bitte warten ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'OK';
$.messager.defaults.cancel = 'Abbruch';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Dieses Feld wird benötigt.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Bitte geben Sie eine gültige E-Mail-Adresse ein.';
$.fn.validatebox.defaults.rules.url.message = 'Bitte geben Sie eine gültige URL ein.';
$.fn.validatebox.defaults.rules.length.message = 'Bitte geben Sie einen Wert zwischen {0} und {1} ein.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.firstDay = 1;
$.fn.calendar.defaults.weeks = ['S','M','D','M','D','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Heute';
$.fn.datebox.defaults.closeText = 'Schließen';
$.fn.datebox.defaults.okText = 'OK';
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return (d<10?('0'+d):d)+'.'+(m<10?('0'+m):m)+'.'+y;
};
$.fn.datebox.defaults.parser = function(s){
if (!s) return new Date();
var ss = s.split('.');
var m = parseInt(ss[1],10);
var d = parseInt(ss[0],10);
var y = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
};
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Σελίδα';
$.fn.pagination.defaults.afterPageText = 'από {pages}';
$.fn.pagination.defaults.displayMsg = 'Εμφάνιση {from} εώς {to} από {total} αντικείμενα';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Γίνεται Επεξεργασία, Παρακαλώ Περιμένετε ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Εντάξει';
$.messager.defaults.cancel = 'Άκυρο';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Το πεδίο είναι υποχρεωτικό.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Παρακαλώ εισάγετε σωστή Ηλ.Διεύθυνση.';
$.fn.validatebox.defaults.rules.url.message = 'Παρακαλώ εισάγετε σωστό σύνδεσμο.';
$.fn.validatebox.defaults.rules.length.message = 'Παρακαλώ εισάγετε τιμή μεταξύ {0} και {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Παρακαλώ διορθώστε αυτό το πεδίο.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'];
$.fn.calendar.defaults.months = ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιου', 'Ιου', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Σήμερα';
$.fn.datebox.defaults.closeText = 'Κλείσιμο';
$.fn.datebox.defaults.okText = 'Εντάξει';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Page';
$.fn.pagination.defaults.afterPageText = 'of {pages}';
$.fn.pagination.defaults.displayMsg = 'Displaying {from} to {to} of {total} items';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Processing, please wait ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Cancel';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'This field is required.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Please enter a valid email address.';
$.fn.validatebox.defaults.rules.url.message = 'Please enter a valid URL.';
$.fn.validatebox.defaults.rules.length.message = 'Please enter a value between {0} and {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Please fix this field.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Today';
$.fn.datebox.defaults.closeText = 'Close';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'P&aacute;gina';
$.fn.pagination.defaults.afterPageText = 'de {pages}';
$.fn.pagination.defaults.displayMsg = 'Mostrando {from} a {to} de {total} elementos';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Procesando, por favor espere ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Aceptar';
$.messager.defaults.cancel = 'Cancelar';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Este campo es obligatorio.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Por favor ingrese una direcci&oacute;n de correo v&aacute;lida.';
$.fn.validatebox.defaults.rules.url.message = 'Por favor ingrese una URL v&aacute;lida.';
$.fn.validatebox.defaults.rules.length.message = 'Por favor ingrese un valor entre {0} y {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Por favor corrija este campo.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'];
$.fn.calendar.defaults.months = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Hoy';
$.fn.datebox.defaults.closeText = 'Cerrar';
$.fn.datebox.defaults.okText = 'Aceptar';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'صفحه';
$.fn.pagination.defaults.afterPageText = 'از {pages}';
$.fn.pagination.defaults.displayMsg = 'نمایش {from} تا {to} از {total} مورد';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'درحال پردازش، لطفا صبر کنید...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'قبول';
$.messager.defaults.cancel = 'انصراف';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'این فیلد اجباری می باشد.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'لطفا آدرس ایمیل را صحیح وارد کنید.';
$.fn.validatebox.defaults.rules.url.message = 'لطفا آدرس سایت را صحیح وارد کنید.';
$.fn.validatebox.defaults.rules.length.message = 'لطفا مقداری بین {0} و {1} وارد کنید.';
$.fn.validatebox.defaults.rules.remote.message = 'لطفا مقدار این فیلد را تصحیح کنید.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'امروز';
$.fn.datebox.defaults.closeText = 'بستن';
$.fn.datebox.defaults.okText = 'قبول';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,62 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Page';
$.fn.pagination.defaults.afterPageText = 'de {pages}';
$.fn.pagination.defaults.displayMsg = 'Affichage de {from} et {to} au {total} des articles';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = "Traitement, s'il vous plaît patienter ...";
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Annuler';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Ce champ est obligatoire.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = "S'il vous plaît entrer une adresse email valide.";
$.fn.validatebox.defaults.rules.url.message = "S'il vous plaît entrer une URL valide.";
$.fn.validatebox.defaults.rules.length.message = "S'il vous plaît entrez une valeur comprise entre {0} et {1}.";
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aôu", "Sep", "Oct", "Nov", "Déc"];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = "Aujourd'hui";
$.fn.datebox.defaults.closeText = 'Fermer';
$.fn.datebox.defaults.okText = 'Ok';
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return (d<10?('0'+d):d)+'/'+(m<10?('0'+m):m)+'/'+y;
};
$.fn.datebox.defaults.parser = function(s){
if (!s) return new Date();
var ss = s.split('/');
var d = parseInt(ss[0],10);
var m = parseInt(ss[1],10);
var y = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
};
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,64 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Pagina';
$.fn.pagination.defaults.afterPageText = 'di {pages}';
$.fn.pagination.defaults.displayMsg = 'Visualizzazione {from} a {to} di {total} elementi';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'In lavorazione, attendere ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Annulla';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Questo campo è richiesto.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Inserisci un indirizzo email valido.';
$.fn.validatebox.defaults.rules.url.message = 'Inserisci un URL valido.';
$.fn.validatebox.defaults.rules.length.message = 'Inserisci un valore tra {0} e {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Correggere questo campo.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.firstDay = 1;
$.fn.calendar.defaults.weeks = ['D','L','M','M','G','V','S'];
$.fn.calendar.defaults.months = ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Oggi';
$.fn.datebox.defaults.closeText = 'Chiudi';
$.fn.datebox.defaults.okText = 'Ok';
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return (d<10?('0'+d):d)+'/'+(m<10?('0'+m):m)+'/'+y;
};
$.fn.datebox.defaults.parser = function(s){
if (!s) return new Date();
var ss = s.split('/');
var d = parseInt(ss[0],10);
var m = parseInt(ss[1],10);
var y = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
};
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'ページ';
$.fn.pagination.defaults.afterPageText = '{pages} 中';
$.fn.pagination.defaults.displayMsg = '全 {total} アイテム中 {from} から {to} を表示中';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = '処理中です。少々お待ちください...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'OK';
$.messager.defaults.cancel = 'キャンセル';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = '入力は必須です。';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = '正しいメールアドレスを入力してください。';
$.fn.validatebox.defaults.rules.url.message = '正しいURLを入力してください。';
$.fn.validatebox.defaults.rules.length.message = '{0} から {1} の範囲の正しい値を入力してください。';
$.fn.validatebox.defaults.rules.remote.message = 'このフィールドを修正してください。';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['日','月','火','水','木','金','土'];
$.fn.calendar.defaults.months = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = '今日';
$.fn.datebox.defaults.closeText = '閉じる';
$.fn.datebox.defaults.okText = 'OK';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = '페이지';
$.fn.pagination.defaults.afterPageText = '{pages} 중';
$.fn.pagination.defaults.displayMsg = '전체 {total} 항목 중 {from}부터 {to}번째';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = '처리 중입니다. 잠시만 기다려 주세요...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = '확인';
$.messager.defaults.cancel = '취소';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = '필수 항목입니다.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = '올바른 메일 주소를 입력해 주세요.';
$.fn.validatebox.defaults.rules.url.message = '올바른 URL를 입력해 주세요.';
$.fn.validatebox.defaults.rules.length.message = '{0}에서 {1} 사이의 값을 입력해 주세요.';
$.fn.validatebox.defaults.rules.remote.message = '이 필드를 수정해 주세요.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['일','월','화','수','목','금','토'];
$.fn.calendar.defaults.months = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = '오늘';
$.fn.datebox.defaults.closeText = '닫기';
$.fn.datebox.defaults.okText = '확인';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,44 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Pagina';
$.fn.pagination.defaults.afterPageText = 'van {pages}';
$.fn.pagination.defaults.displayMsg = 'Tonen van {from} tot {to} van de {total} items';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Verwerking, even geduld ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Annuleren';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Dit veld is verplicht.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Geef een geldig e-mailadres.';
$.fn.validatebox.defaults.rules.url.message = 'Vul een geldige URL.';
$.fn.validatebox.defaults.rules.length.message = 'Voer een waarde tussen {0} en {1}.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['S','M','T','W','T','F','S'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Vandaag';
$.fn.datebox.defaults.closeText = 'Dicht';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Strona';
$.fn.pagination.defaults.afterPageText = 'z {pages}';
$.fn.pagination.defaults.displayMsg = 'Wyświetlono elementy od {from} do {to} z {total}';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Przetwarzanie, proszę czekać ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Cancel';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'To pole jest wymagane.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Wprowadź poprawny adres email.';
$.fn.validatebox.defaults.rules.url.message = 'Wprowadź poprawny adres URL.';
$.fn.validatebox.defaults.rules.length.message = 'Wprowadź wartość z zakresu od {0} do {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Proszę poprawić to pole.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['N','P','W','Ś','C','P','S'];
$.fn.calendar.defaults.months = ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Dzisiaj';
$.fn.datebox.defaults.closeText = 'Zamknij';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Página';
$.fn.pagination.defaults.afterPageText = 'de {pages}';
$.fn.pagination.defaults.displayMsg = 'Mostrando {from} a {to} de {total} itens';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Processando, aguarde ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Cancelar';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Esse campo é requerido.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Insira um endereço de email válido.';
$.fn.validatebox.defaults.rules.url.message = 'Insira uma URL válida.';
$.fn.validatebox.defaults.rules.length.message = 'Insira uma valor entre {0} e {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Corrija esse campo.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['D','S','T','Q','Q','S','S'];
$.fn.calendar.defaults.months = ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Hoje';
$.fn.datebox.defaults.closeText = 'Fechar';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,46 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Страница';
$.fn.pagination.defaults.afterPageText = 'из {pages}';
$.fn.pagination.defaults.displayMsg = 'Просмотр {from} до {to} из {total} записей';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Обрабатывается, пожалуйста ждите ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ок';
$.messager.defaults.cancel = 'Закрыть';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Это поле необходимо.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Пожалуйста введите корректный e-mail адрес.';
$.fn.validatebox.defaults.rules.url.message = 'Пожалуйста введите корректный URL.';
$.fn.validatebox.defaults.rules.length.message = 'Пожалуйста введите зачение между {0} и {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Пожалуйста исправте это поле.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.firstDay = 1;
$.fn.calendar.defaults.weeks = ['В','П','В','С','Ч','П','С'];
$.fn.calendar.defaults.months = ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Сегодня';
$.fn.datebox.defaults.closeText = 'Закрыть';
$.fn.datebox.defaults.okText = 'Ок';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,45 @@
if ($.fn.pagination) {
$.fn.pagination.defaults.beforePageText = 'Sida';
$.fn.pagination.defaults.afterPageText = 'av {pages}';
$.fn.pagination.defaults.displayMsg = 'Visar {from} till {to} av {total} poster';
}
if ($.fn.datagrid) {
$.fn.datagrid.defaults.loadMsg = 'Bearbetar, vänligen vänta ...';
}
if ($.fn.treegrid && $.fn.datagrid) {
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager) {
$.messager.defaults.ok = 'Ok';
$.messager.defaults.cancel = 'Avbryt';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Detta fält är obligatoriskt.';
}
});
if ($.fn.validatebox) {
$.fn.validatebox.defaults.rules.email.message = 'Vänligen ange en korrekt e-post adress.';
$.fn.validatebox.defaults.rules.url.message = 'Vänligen ange en korrekt URL.';
$.fn.validatebox.defaults.rules.length.message = 'Vänligen ange ett nummer mellan {0} och {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Vänligen åtgärda detta fält.';
}
if ($.fn.calendar) {
$.fn.calendar.defaults.weeks = ['Sön', 'Mån', 'Tis', 'Ons', 'Tors', 'Fre', 'Lör'];
$.fn.calendar.defaults.months = ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'];
}
if ($.fn.datebox) {
$.fn.datebox.defaults.currentText = 'I dag';
$.fn.datebox.defaults.closeText = 'Stäng';
$.fn.datebox.defaults.okText = 'Ok';
}
if ($.fn.datetimebox && $.fn.datebox) {
$.extend($.fn.datetimebox.defaults, {
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,59 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Sayfa';
$.fn.pagination.defaults.afterPageText = ' / {pages}';
$.fn.pagination.defaults.displayMsg = '{from} ile {to} arası gösteriliyor, toplam {total} kayıt';
}
if ($.fn.datagrid){
$.fn.panel.defaults.loadingMessage = "Yükleniyor...";
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadingMessage = "Yükleniyor...";
$.fn.datagrid.defaults.loadMsg = 'İşleminiz Yapılıyor, lütfen bekleyin ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Tamam';
$.messager.defaults.cancel = 'İptal';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Bu alan zorunludur.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Lütfen geçerli bir email adresi giriniz.';
$.fn.validatebox.defaults.rules.url.message = 'Lütfen geçerli bir URL giriniz.';
$.fn.validatebox.defaults.rules.length.message = 'Lütfen {0} ile {1} arasında bir değer giriniz.';
$.fn.validatebox.defaults.rules.remote.message = 'Lütfen bu alanı düzeltiniz.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'];
$.fn.calendar.defaults.months = ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Bugün';
$.fn.datebox.defaults.closeText = 'Kapat';
$.fn.datebox.defaults.okText = 'Tamam';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
$.fn.datebox.defaults.formatter=function(date){
var y=date.getFullYear();
var m=date.getMonth()+1;
var d=date.getDate();
if(m<10){m="0"+m;}
if(d<10){d="0"+d;}
return d+"."+m+"."+y;
};
}

View File

@ -0,0 +1,46 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = 'Сторінка';
$.fn.pagination.defaults.afterPageText = 'з {pages}';
$.fn.pagination.defaults.displayMsg = 'Перегляд {from} до {to} з {total} записів';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = 'Обробляється, зачекайте будь даска ...';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = 'Ок';
$.messager.defaults.cancel = 'Закрити';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = 'Це поле необхідно.';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = 'Будь ласка, введіть коректну e-mail адресу.';
$.fn.validatebox.defaults.rules.url.message = 'Будь ласка, введіть коректний URL.';
$.fn.validatebox.defaults.rules.length.message = 'Будь ласка введіть значення між {0} і {1}.';
$.fn.validatebox.defaults.rules.remote.message = 'Будь ласка виправте це поле.';
}
if ($.fn.calendar){
$.fn.calendar.defaults.firstDay = 1;
$.fn.calendar.defaults.weeks = ['В','П','В','С','Ч','П','С'];
$.fn.calendar.defaults.months = ['Січ', 'Лют', 'Бер', 'Квіт', 'Трав', 'Черв', 'Лип', 'Серп', 'Вер', 'Жовт', 'Лист', 'Груд'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = 'Сьогодні';
$.fn.datebox.defaults.closeText = 'Закрити';
$.fn.datebox.defaults.okText = 'Ок';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}

View File

@ -0,0 +1,66 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = '第';
$.fn.pagination.defaults.afterPageText = '共{pages}页';
$.fn.pagination.defaults.displayMsg = '显示{from}到{to},共{total}记录';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = '正在处理,请稍待。。。';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = '确定';
$.messager.defaults.cancel = '取消';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = '该输入项为必输项';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = '请输入有效的电子邮件地址';
$.fn.validatebox.defaults.rules.url.message = '请输入有效的URL地址';
$.fn.validatebox.defaults.rules.length.message = '输入内容长度必须介于{0}和{1}之间';
$.fn.validatebox.defaults.rules.remote.message = '请修正该字段';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六'];
$.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = '今天';
$.fn.datebox.defaults.closeText = '关闭';
$.fn.datebox.defaults.okText = '确定';
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
};
$.fn.datebox.defaults.parser = function(s){
if (!s) return new Date();
var ss = s.split('-');
var y = parseInt(ss[0],10);
var m = parseInt(ss[1],10);
var d = parseInt(ss[2],10);
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
return new Date(y,m-1,d);
} else {
return new Date();
}
};
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}
if ($.fn.datetimespinner){
$.fn.datetimespinner.defaults.selections = [[0,4],[5,7],[8,10],[11,13],[14,16],[17,19]]
}

View File

@ -0,0 +1,48 @@
if ($.fn.pagination){
$.fn.pagination.defaults.beforePageText = '第';
$.fn.pagination.defaults.afterPageText = '共{pages}頁';
$.fn.pagination.defaults.displayMsg = '顯示{from}到{to},共{total}記錄';
}
if ($.fn.datagrid){
$.fn.datagrid.defaults.loadMsg = '正在處理,請稍待。。。';
}
if ($.fn.treegrid && $.fn.datagrid){
$.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg;
}
if ($.messager){
$.messager.defaults.ok = '確定';
$.messager.defaults.cancel = '取消';
}
$.map(['validatebox','textbox','passwordbox','filebox','searchbox',
'combo','combobox','combogrid','combotree',
'datebox','datetimebox','numberbox',
'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){
if ($.fn[plugin]){
$.fn[plugin].defaults.missingMessage = '該輸入項為必輸項';
}
});
if ($.fn.validatebox){
$.fn.validatebox.defaults.rules.email.message = '請輸入有效的電子郵件地址';
$.fn.validatebox.defaults.rules.url.message = '請輸入有效的URL地址';
$.fn.validatebox.defaults.rules.length.message = '輸入內容長度必須介於{0}和{1}之間';
$.fn.validatebox.defaults.rules.remote.message = '請修正此欄位';
}
if ($.fn.calendar){
$.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六'];
$.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
}
if ($.fn.datebox){
$.fn.datebox.defaults.currentText = '今天';
$.fn.datebox.defaults.closeText = '關閉';
$.fn.datebox.defaults.okText = '確定';
}
if ($.fn.datetimebox && $.fn.datebox){
$.extend($.fn.datetimebox.defaults,{
currentText: $.fn.datebox.defaults.currentText,
closeText: $.fn.datebox.defaults.closeText,
okText: $.fn.datebox.defaults.okText
});
}
if ($.fn.datetimespinner){
$.fn.datetimespinner.defaults.selections = [[0,4],[5,7],[8,10],[11,13],[14,16],[17,19]]
}

View File

@ -0,0 +1,350 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
function _1(_2,_3){
var _4=$.data(_2,"accordion");
var _5=_4.options;
var _6=_4.panels;
var cc=$(_2);
var _7=(_5.halign=="left"||_5.halign=="right");
cc.children(".panel-last").removeClass("panel-last");
cc.children(".panel:last").addClass("panel-last");
if(_3){
$.extend(_5,{width:_3.width,height:_3.height});
}
cc._size(_5);
var _8=0;
var _9="auto";
var _a=cc.find(">.panel>.accordion-header");
if(_a.length){
if(_7){
$(_a[0]).next().panel("resize",{width:cc.width(),height:cc.height()});
_8=$(_a[0])._outerWidth();
}else{
_8=$(_a[0]).css("height","")._outerHeight();
}
}
if(!isNaN(parseInt(_5.height))){
if(_7){
_9=cc.width()-_8*_a.length;
}else{
_9=cc.height()-_8*_a.length;
}
}
_b(true,_9-_b(false));
function _b(_c,_d){
var _e=0;
for(var i=0;i<_6.length;i++){
var p=_6[i];
if(_7){
var h=p.panel("header")._outerWidth(_8);
}else{
var h=p.panel("header")._outerHeight(_8);
}
if(p.panel("options").collapsible==_c){
var _f=isNaN(_d)?undefined:(_d+_8*h.length);
if(_7){
p.panel("resize",{height:cc.height(),width:(_c?_f:undefined)});
_e+=p.panel("panel")._outerWidth()-_8*h.length;
}else{
p.panel("resize",{width:cc.width(),height:(_c?_f:undefined)});
_e+=p.panel("panel").outerHeight()-_8*h.length;
}
}
}
return _e;
};
};
function _10(_11,_12,_13,all){
var _14=$.data(_11,"accordion").panels;
var pp=[];
for(var i=0;i<_14.length;i++){
var p=_14[i];
if(_12){
if(p.panel("options")[_12]==_13){
pp.push(p);
}
}else{
if(p[0]==$(_13)[0]){
return i;
}
}
}
if(_12){
return all?pp:(pp.length?pp[0]:null);
}else{
return -1;
}
};
function _15(_16){
return _10(_16,"collapsed",false,true);
};
function _17(_18){
var pp=_15(_18);
return pp.length?pp[0]:null;
};
function _19(_1a,_1b){
return _10(_1a,null,_1b);
};
function _1c(_1d,_1e){
var _1f=$.data(_1d,"accordion").panels;
if(typeof _1e=="number"){
if(_1e<0||_1e>=_1f.length){
return null;
}else{
return _1f[_1e];
}
}
return _10(_1d,"title",_1e);
};
function _20(_21){
var _22=$.data(_21,"accordion").options;
var cc=$(_21);
if(_22.border){
cc.removeClass("accordion-noborder");
}else{
cc.addClass("accordion-noborder");
}
};
function _23(_24){
var _25=$.data(_24,"accordion");
var cc=$(_24);
cc.addClass("accordion");
_25.panels=[];
cc.children("div").each(function(){
var _26=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
var pp=$(this);
_25.panels.push(pp);
_28(_24,pp,_26);
});
cc._bind("_resize",function(e,_27){
if($(this).hasClass("easyui-fluid")||_27){
_1(_24);
}
return false;
});
};
function _28(_29,pp,_2a){
var _2b=$.data(_29,"accordion").options;
pp.panel($.extend({},{collapsible:true,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:true,headerCls:"accordion-header",bodyCls:"accordion-body",halign:_2b.halign},_2a,{onBeforeExpand:function(){
if(_2a.onBeforeExpand){
if(_2a.onBeforeExpand.call(this)==false){
return false;
}
}
if(!_2b.multiple){
var all=$.grep(_15(_29),function(p){
return p.panel("options").collapsible;
});
for(var i=0;i<all.length;i++){
_34(_29,_19(_29,all[i]));
}
}
var _2c=$(this).panel("header");
_2c.addClass("accordion-header-selected");
_2c.find(".accordion-collapse").removeClass("accordion-expand");
},onExpand:function(){
$(_29).find(">.panel-last>.accordion-header").removeClass("accordion-header-border");
if(_2a.onExpand){
_2a.onExpand.call(this);
}
_2b.onSelect.call(_29,$(this).panel("options").title,_19(_29,this));
},onBeforeCollapse:function(){
if(_2a.onBeforeCollapse){
if(_2a.onBeforeCollapse.call(this)==false){
return false;
}
}
$(_29).find(">.panel-last>.accordion-header").addClass("accordion-header-border");
var _2d=$(this).panel("header");
_2d.removeClass("accordion-header-selected");
_2d.find(".accordion-collapse").addClass("accordion-expand");
},onCollapse:function(){
if(isNaN(parseInt(_2b.height))){
$(_29).find(">.panel-last>.accordion-header").removeClass("accordion-header-border");
}
if(_2a.onCollapse){
_2a.onCollapse.call(this);
}
_2b.onUnselect.call(_29,$(this).panel("options").title,_19(_29,this));
}}));
var _2e=pp.panel("header");
var _2f=_2e.children("div.panel-tool");
_2f.children("a.panel-tool-collapse").hide();
var t=$("<a href=\"javascript:;\"></a>").addClass("accordion-collapse accordion-expand").appendTo(_2f);
t._bind("click",function(){
_30(pp);
return false;
});
pp.panel("options").collapsible?t.show():t.hide();
if(_2b.halign=="left"||_2b.halign=="right"){
t.hide();
}
_2e._bind("click",function(){
_30(pp);
return false;
});
function _30(p){
var _31=p.panel("options");
if(_31.collapsible){
var _32=_19(_29,p);
if(_31.collapsed){
_33(_29,_32);
}else{
_34(_29,_32);
}
}
};
};
function _33(_35,_36){
var p=_1c(_35,_36);
if(!p){
return;
}
_37(_35);
var _38=$.data(_35,"accordion").options;
p.panel("expand",_38.animate);
};
function _34(_39,_3a){
var p=_1c(_39,_3a);
if(!p){
return;
}
_37(_39);
var _3b=$.data(_39,"accordion").options;
p.panel("collapse",_3b.animate);
};
function _3c(_3d){
var _3e=$.data(_3d,"accordion").options;
$(_3d).find(">.panel-last>.accordion-header").addClass("accordion-header-border");
var p=_10(_3d,"selected",true);
if(p){
_3f(_19(_3d,p));
}else{
_3f(_3e.selected);
}
function _3f(_40){
var _41=_3e.animate;
_3e.animate=false;
_33(_3d,_40);
_3e.animate=_41;
};
};
function _37(_42){
var _43=$.data(_42,"accordion").panels;
for(var i=0;i<_43.length;i++){
_43[i].stop(true,true);
}
};
function add(_44,_45){
var _46=$.data(_44,"accordion");
var _47=_46.options;
var _48=_46.panels;
if(_45.selected==undefined){
_45.selected=true;
}
_37(_44);
var pp=$("<div></div>").appendTo(_44);
_48.push(pp);
_28(_44,pp,_45);
_1(_44);
_47.onAdd.call(_44,_45.title,_48.length-1);
if(_45.selected){
_33(_44,_48.length-1);
}
};
function _49(_4a,_4b){
var _4c=$.data(_4a,"accordion");
var _4d=_4c.options;
var _4e=_4c.panels;
_37(_4a);
var _4f=_1c(_4a,_4b);
var _50=_4f.panel("options").title;
var _51=_19(_4a,_4f);
if(!_4f){
return;
}
if(_4d.onBeforeRemove.call(_4a,_50,_51)==false){
return;
}
_4e.splice(_51,1);
_4f.panel("destroy");
if(_4e.length){
_1(_4a);
var _52=_17(_4a);
if(!_52){
_33(_4a,0);
}
}
_4d.onRemove.call(_4a,_50,_51);
};
$.fn.accordion=function(_53,_54){
if(typeof _53=="string"){
return $.fn.accordion.methods[_53](this,_54);
}
_53=_53||{};
return this.each(function(){
var _55=$.data(this,"accordion");
if(_55){
$.extend(_55.options,_53);
}else{
$.data(this,"accordion",{options:$.extend({},$.fn.accordion.defaults,$.fn.accordion.parseOptions(this),_53),accordion:$(this).addClass("accordion"),panels:[]});
_23(this);
}
_20(this);
_1(this);
_3c(this);
});
};
$.fn.accordion.methods={options:function(jq){
return $.data(jq[0],"accordion").options;
},panels:function(jq){
return $.data(jq[0],"accordion").panels;
},resize:function(jq,_56){
return jq.each(function(){
_1(this,_56);
});
},getSelections:function(jq){
return _15(jq[0]);
},getSelected:function(jq){
return _17(jq[0]);
},getPanel:function(jq,_57){
return _1c(jq[0],_57);
},getPanelIndex:function(jq,_58){
return _19(jq[0],_58);
},select:function(jq,_59){
return jq.each(function(){
_33(this,_59);
});
},unselect:function(jq,_5a){
return jq.each(function(){
_34(this,_5a);
});
},add:function(jq,_5b){
return jq.each(function(){
add(this,_5b);
});
},remove:function(jq,_5c){
return jq.each(function(){
_49(this,_5c);
});
}};
$.fn.accordion.parseOptions=function(_5d){
var t=$(_5d);
return $.extend({},$.parser.parseOptions(_5d,["width","height","halign",{fit:"boolean",border:"boolean",animate:"boolean",multiple:"boolean",selected:"number"}]));
};
$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,multiple:false,selected:0,halign:"top",onSelect:function(_5e,_5f){
},onUnselect:function(_60,_61){
},onAdd:function(_62,_63){
},onBeforeRemove:function(_64,_65){
},onRemove:function(_66,_67){
}};
})(jQuery);

View File

@ -0,0 +1,403 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
function _1(_2,_3){
var _4=$.data(_2,"calendar").options;
var t=$(_2);
if(_3){
$.extend(_4,{width:_3.width,height:_3.height});
}
t._size(_4,t.parent());
t.find(".calendar-body")._outerHeight(t.height()-t.find(".calendar-header")._outerHeight());
if(t.find(".calendar-menu").is(":visible")){
_5(_2);
}
};
function _6(_7){
$(_7).addClass("calendar").html("<div class=\"calendar-header\">"+"<div class=\"calendar-nav calendar-prevmonth\"></div>"+"<div class=\"calendar-nav calendar-nextmonth\"></div>"+"<div class=\"calendar-nav calendar-prevyear\"></div>"+"<div class=\"calendar-nav calendar-nextyear\"></div>"+"<div class=\"calendar-title\">"+"<span class=\"calendar-text\"></span>"+"</div>"+"</div>"+"<div class=\"calendar-body\">"+"<div class=\"calendar-menu\">"+"<div class=\"calendar-menu-year-inner\">"+"<span class=\"calendar-nav calendar-menu-prev\"></span>"+"<span><input class=\"calendar-menu-year\" type=\"text\"></span>"+"<span class=\"calendar-nav calendar-menu-next\"></span>"+"</div>"+"<div class=\"calendar-menu-month-inner\">"+"</div>"+"</div>"+"</div>");
$(_7)._bind("_resize",function(e,_8){
if($(this).hasClass("easyui-fluid")||_8){
_1(_7);
}
return false;
});
};
function _9(_a){
var _b=$.data(_a,"calendar").options;
var _c=$(_a).find(".calendar-menu");
_c.find(".calendar-menu-year")._unbind(".calendar")._bind("keypress.calendar",function(e){
if(e.keyCode==13){
_d(true);
}
});
$(_a)._unbind(".calendar")._bind("mouseover.calendar",function(e){
var t=_e(e.target);
if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){
t.addClass("calendar-nav-hover");
}
})._bind("mouseout.calendar",function(e){
var t=_e(e.target);
if(t.hasClass("calendar-nav")||t.hasClass("calendar-text")||(t.hasClass("calendar-day")&&!t.hasClass("calendar-disabled"))){
t.removeClass("calendar-nav-hover");
}
})._bind("click.calendar",function(e){
var t=_e(e.target);
if(t.hasClass("calendar-menu-next")||t.hasClass("calendar-nextyear")){
_f(1);
}else{
if(t.hasClass("calendar-menu-prev")||t.hasClass("calendar-prevyear")){
_f(-1);
}else{
if(t.hasClass("calendar-menu-month")){
_c.find(".calendar-selected").removeClass("calendar-selected");
t.addClass("calendar-selected");
_d(true);
}else{
if(t.hasClass("calendar-prevmonth")){
_10(-1);
}else{
if(t.hasClass("calendar-nextmonth")){
_10(1);
}else{
if(t.hasClass("calendar-text")){
if(_c.is(":visible")){
_c.hide();
}else{
_5(_a);
}
}else{
if(t.hasClass("calendar-day")){
if(t.hasClass("calendar-disabled")){
return;
}
var _11=_b.current;
t.closest("div.calendar-body").find(".calendar-selected").removeClass("calendar-selected");
t.addClass("calendar-selected");
var _12=t.attr("abbr").split(",");
var y=parseInt(_12[0]);
var m=parseInt(_12[1]);
var d=parseInt(_12[2]);
_b.current=new _b.Date(y,m-1,d);
_b.onSelect.call(_a,_b.current);
if(!_11||_11.getTime()!=_b.current.getTime()){
_b.onChange.call(_a,_b.current,_11);
}
if(_b.year!=y||_b.month!=m){
_b.year=y;
_b.month=m;
_19(_a);
}
}
}
}
}
}
}
}
});
function _e(t){
var day=$(t).closest(".calendar-day");
if(day.length){
return day;
}else{
return $(t);
}
};
function _d(_13){
var _14=$(_a).find(".calendar-menu");
var _15=_14.find(".calendar-menu-year").val();
var _16=_14.find(".calendar-selected").attr("abbr");
if(!isNaN(_15)){
_b.year=parseInt(_15);
_b.month=parseInt(_16);
_19(_a);
}
if(_13){
_14.hide();
}
};
function _f(_17){
_b.year+=_17;
_19(_a);
_c.find(".calendar-menu-year").val(_b.year);
};
function _10(_18){
_b.month+=_18;
if(_b.month>12){
_b.year++;
_b.month=1;
}else{
if(_b.month<1){
_b.year--;
_b.month=12;
}
}
_19(_a);
_c.find("td.calendar-selected").removeClass("calendar-selected");
_c.find("td:eq("+(_b.month-1)+")").addClass("calendar-selected");
};
};
function _5(_1a){
var _1b=$.data(_1a,"calendar").options;
$(_1a).find(".calendar-menu").show();
if($(_1a).find(".calendar-menu-month-inner").is(":empty")){
$(_1a).find(".calendar-menu-month-inner").empty();
var t=$("<table class=\"calendar-mtable\"></table>").appendTo($(_1a).find(".calendar-menu-month-inner"));
var idx=0;
for(var i=0;i<3;i++){
var tr=$("<tr></tr>").appendTo(t);
for(var j=0;j<4;j++){
$("<td class=\"calendar-nav calendar-menu-month\"></td>").html(_1b.months[idx++]).attr("abbr",idx).appendTo(tr);
}
}
}
var _1c=$(_1a).find(".calendar-body");
var _1d=$(_1a).find(".calendar-menu");
var _1e=_1d.find(".calendar-menu-year-inner");
var _1f=_1d.find(".calendar-menu-month-inner");
_1e.find("input").val(_1b.year).focus();
_1f.find("td.calendar-selected").removeClass("calendar-selected");
_1f.find("td:eq("+(_1b.month-1)+")").addClass("calendar-selected");
_1d._outerWidth(_1c._outerWidth());
_1d._outerHeight(_1c._outerHeight());
_1f._outerHeight(_1d.height()-_1e._outerHeight());
};
function _20(_21,_22,_23){
var _24=$.data(_21,"calendar").options;
var _25=[];
var _26=new _24.Date(_22,_23,0).getDate();
for(var i=1;i<=_26;i++){
_25.push([_22,_23,i]);
}
var _27=[],_28=[];
var _29=-1;
while(_25.length>0){
var _2a=_25.shift();
_28.push(_2a);
var day=new _24.Date(_2a[0],_2a[1]-1,_2a[2]).getDay();
if(_29==day){
day=0;
}else{
if(day==(_24.firstDay==0?7:_24.firstDay)-1){
_27.push(_28);
_28=[];
}
}
_29=day;
}
if(_28.length){
_27.push(_28);
}
var _2b=_27[0];
if(_2b.length<7){
while(_2b.length<7){
var _2c=_2b[0];
var _2a=new _24.Date(_2c[0],_2c[1]-1,_2c[2]-1);
_2b.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
}
}else{
var _2c=_2b[0];
var _28=[];
for(var i=1;i<=7;i++){
var _2a=new _24.Date(_2c[0],_2c[1]-1,_2c[2]-i);
_28.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
}
_27.unshift(_28);
}
var _2d=_27[_27.length-1];
while(_2d.length<7){
var _2e=_2d[_2d.length-1];
var _2a=new _24.Date(_2e[0],_2e[1]-1,_2e[2]+1);
_2d.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
}
if(_27.length<6){
var _2e=_2d[_2d.length-1];
var _28=[];
for(var i=1;i<=7;i++){
var _2a=new _24.Date(_2e[0],_2e[1]-1,_2e[2]+i);
_28.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
}
_27.push(_28);
}
return _27;
};
function _19(_2f){
var _30=$.data(_2f,"calendar").options;
if(_30.current&&!_30.validator.call(_2f,_30.current)){
_30.current=null;
}
var now=new _30.Date();
var _31=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate();
var _32=_30.current?(_30.current.getFullYear()+","+(_30.current.getMonth()+1)+","+_30.current.getDate()):"";
var _33=6-_30.firstDay;
var _34=_33+1;
if(_33>=7){
_33-=7;
}
if(_34>=7){
_34-=7;
}
$(_2f).find(".calendar-title span").html(_30.months[_30.month-1]+" "+_30.year);
var _35=$(_2f).find("div.calendar-body");
_35.children("table").remove();
var _36=["<table class=\"calendar-dtable\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"];
_36.push("<thead><tr>");
if(_30.showWeek){
_36.push("<th class=\"calendar-week\">"+_30.weekNumberHeader+"</th>");
}
for(var i=_30.firstDay;i<_30.weeks.length;i++){
_36.push("<th>"+_30.weeks[i]+"</th>");
}
for(var i=0;i<_30.firstDay;i++){
_36.push("<th>"+_30.weeks[i]+"</th>");
}
_36.push("</tr></thead>");
_36.push("<tbody>");
var _37=_20(_2f,_30.year,_30.month);
for(var i=0;i<_37.length;i++){
var _38=_37[i];
var cls="";
if(i==0){
cls="calendar-first";
}else{
if(i==_37.length-1){
cls="calendar-last";
}
}
_36.push("<tr class=\""+cls+"\">");
if(_30.showWeek){
var _39=_30.getWeekNumber(new _30.Date(_38[0][0],parseInt(_38[0][1])-1,_38[0][2]));
_36.push("<td class=\"calendar-week\">"+_39+"</td>");
}
for(var j=0;j<_38.length;j++){
var day=_38[j];
var s=day[0]+","+day[1]+","+day[2];
var _3a=new _30.Date(day[0],parseInt(day[1])-1,day[2]);
var d=_30.formatter.call(_2f,_3a);
var css=_30.styler.call(_2f,_3a);
var _3b="";
var _3c="";
if(typeof css=="string"){
_3c=css;
}else{
if(css){
_3b=css["class"]||"";
_3c=css["style"]||"";
}
}
var cls="calendar-day";
if(!(_30.year==day[0]&&_30.month==day[1])){
cls+=" calendar-other-month";
}
if(s==_31){
cls+=" calendar-today";
}
if(s==_32){
cls+=" calendar-selected";
}
if(j==_33){
cls+=" calendar-saturday";
}else{
if(j==_34){
cls+=" calendar-sunday";
}
}
if(j==0){
cls+=" calendar-first";
}else{
if(j==_38.length-1){
cls+=" calendar-last";
}
}
cls+=" "+_3b;
if(!_30.validator.call(_2f,_3a)){
cls+=" calendar-disabled";
}
_36.push("<td class=\""+cls+"\" abbr=\""+s+"\" style=\""+_3c+"\">"+d+"</td>");
}
_36.push("</tr>");
}
_36.push("</tbody>");
_36.push("</table>");
_35.append(_36.join(""));
_35.children("table.calendar-dtable").prependTo(_35);
_30.onNavigate.call(_2f,_30.year,_30.month);
};
$.fn.calendar=function(_3d,_3e){
if(typeof _3d=="string"){
return $.fn.calendar.methods[_3d](this,_3e);
}
_3d=_3d||{};
return this.each(function(){
var _3f=$.data(this,"calendar");
if(_3f){
$.extend(_3f.options,_3d);
}else{
_3f=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,$.fn.calendar.parseOptions(this),_3d)});
_6(this);
}
if(_3f.options.border==false){
$(this).addClass("calendar-noborder");
}
_1(this);
_9(this);
_19(this);
$(this).find("div.calendar-menu").hide();
});
};
$.fn.calendar.methods={options:function(jq){
return $.data(jq[0],"calendar").options;
},resize:function(jq,_40){
return jq.each(function(){
_1(this,_40);
});
},moveTo:function(jq,_41){
return jq.each(function(){
var _42=$(this).calendar("options");
if(!_41){
var now=new _42.Date();
$(this).calendar({year:now.getFullYear(),month:now.getMonth()+1,current:_41});
return;
}
if(_42.validator.call(this,_41)){
var _43=_42.current;
$(this).calendar({year:_41.getFullYear(),month:_41.getMonth()+1,current:_41});
if(!_43||_43.getTime()!=_41.getTime()){
_42.onChange.call(this,_42.current,_43);
}
}
});
}};
$.fn.calendar.parseOptions=function(_44){
var t=$(_44);
return $.extend({},$.parser.parseOptions(_44,["weekNumberHeader",{firstDay:"number",fit:"boolean",border:"boolean",showWeek:"boolean"}]));
};
$.fn.calendar.defaults={Date:Date,width:180,height:180,fit:false,border:true,showWeek:false,firstDay:0,weeks:["S","M","T","W","T","F","S"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year:new Date().getFullYear(),month:new Date().getMonth()+1,current:(function(){
var d=new Date();
return new Date(d.getFullYear(),d.getMonth(),d.getDate());
})(),weekNumberHeader:"",getWeekNumber:function(_45){
var _46=new Date(_45.getTime());
_46.setDate(_46.getDate()+4-(_46.getDay()||7));
var _47=_46.getTime();
_46.setMonth(0);
_46.setDate(1);
return Math.floor(Math.round((_47-_46)/86400000)/7)+1;
},formatter:function(_48){
return _48.getDate();
},styler:function(_49){
return "";
},validator:function(_4a){
return true;
},onSelect:function(_4b){
},onChange:function(_4c,_4d){
},onNavigate:function(_4e,_4f){
}};
})(jQuery);

View File

@ -0,0 +1,190 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
var _1=1;
function _2(_3){
var _4=$("<span class=\"checkbox inputbox\">"+"<span class=\"checkbox-inner\">"+"<svg xml:space=\"preserve\" focusable=\"false\" version=\"1.1\" viewBox=\"0 0 24 24\"><path d=\"M4.1,12.7 9,17.6 20.3,6.3\" fill=\"none\" stroke=\"white\"></path></svg>"+"</span>"+"<input type=\"checkbox\" class=\"checkbox-value\">"+"</span>").insertAfter(_3);
var t=$(_3);
t.addClass("checkbox-f").hide();
var _5=t.attr("name");
if(_5){
t.removeAttr("name").attr("checkboxName",_5);
_4.find(".checkbox-value").attr("name",_5);
}
return _4;
};
function _6(_7){
var _8=$.data(_7,"checkbox");
var _9=_8.options;
var _a=_8.checkbox;
var _b="_easyui_checkbox_"+(++_1);
var _c=_a.find(".checkbox-value").attr("id",_b);
_c._unbind(".checkbox")._bind("change.checkbox",function(e){
return false;
});
if(_9.label){
if(typeof _9.label=="object"){
_8.label=$(_9.label);
_8.label.attr("for",_b);
}else{
$(_8.label).remove();
_8.label=$("<label class=\"textbox-label\"></label>").html(_9.label);
_8.label.css("textAlign",_9.labelAlign).attr("for",_b);
if(_9.labelPosition=="after"){
_8.label.insertAfter(_a);
}else{
_8.label.insertBefore(_7);
}
_8.label.removeClass("textbox-label-left textbox-label-right textbox-label-top");
_8.label.addClass("textbox-label-"+_9.labelPosition);
}
}else{
$(_8.label).remove();
}
$(_7).checkbox("setValue",_9.value);
_d(_7,_9.checked);
_e(_7,_9.readonly);
_f(_7,_9.disabled);
};
function _10(_11){
var _12=$.data(_11,"checkbox");
var _13=_12.options;
var _14=_12.checkbox;
_14._unbind(".checkbox")._bind("click.checkbox",function(){
if(!_13.disabled&&!_13.readonly){
_d(_11,!_13.checked);
}
});
};
function _15(_16){
var _17=$.data(_16,"checkbox");
var _18=_17.options;
var _19=_17.checkbox;
_19._size(_18,_19.parent());
if(_18.label&&_18.labelPosition){
if(_18.labelPosition=="top"){
_17.label._size({width:_18.labelWidth},_19);
}else{
_17.label._size({width:_18.labelWidth,height:_19.outerHeight()},_19);
_17.label.css("lineHeight",_19.outerHeight()+"px");
}
}
};
function _d(_1a,_1b){
var _1c=$.data(_1a,"checkbox");
var _1d=_1c.options;
var _1e=_1c.checkbox;
_1e.find(".checkbox-value")._propAttr("checked",_1b);
var _1f=_1e.find(".checkbox-inner").css("display",_1b?"":"none");
if(_1b){
_1e.addClass("checkbox-checked");
$(_1c.label).addClass("textbox-label-checked");
}else{
_1e.removeClass("checkbox-checked");
$(_1c.label).removeClass("textbox-label-checked");
}
if(_1d.checked!=_1b){
_1d.checked=_1b;
_1d.onChange.call(_1a,_1b);
$(_1a).closest("form").trigger("_change",[_1a]);
}
};
function _e(_20,_21){
var _22=$.data(_20,"checkbox");
var _23=_22.options;
_23.readonly=_21==undefined?true:_21;
if(_23.readonly){
_22.checkbox.addClass("checkbox-readonly");
$(_22.label).addClass("textbox-label-readonly");
}else{
_22.checkbox.removeClass("checkbox-readonly");
$(_22.label).removeClass("textbox-label-readonly");
}
};
function _f(_24,_25){
var _26=$.data(_24,"checkbox");
var _27=_26.options;
var _28=_26.checkbox;
var rv=_28.find(".checkbox-value");
_27.disabled=_25;
if(_25){
$(_24).add(rv)._propAttr("disabled",true);
_28.addClass("checkbox-disabled");
$(_26.label).addClass("textbox-label-disabled");
}else{
$(_24).add(rv)._propAttr("disabled",false);
_28.removeClass("checkbox-disabled");
$(_26.label).removeClass("textbox-label-disabled");
}
};
$.fn.checkbox=function(_29,_2a){
if(typeof _29=="string"){
return $.fn.checkbox.methods[_29](this,_2a);
}
_29=_29||{};
return this.each(function(){
var _2b=$.data(this,"checkbox");
if(_2b){
$.extend(_2b.options,_29);
}else{
_2b=$.data(this,"checkbox",{options:$.extend({},$.fn.checkbox.defaults,$.fn.checkbox.parseOptions(this),_29),checkbox:_2(this)});
}
_2b.options.originalChecked=_2b.options.checked;
_6(this);
_10(this);
_15(this);
});
};
$.fn.checkbox.methods={options:function(jq){
var _2c=jq.data("checkbox");
return $.extend(_2c.options,{value:_2c.checkbox.find(".checkbox-value").val()});
},setValue:function(jq,_2d){
return jq.each(function(){
$(this).val(_2d);
$.data(this,"checkbox").checkbox.find(".checkbox-value").val(_2d);
});
},enable:function(jq){
return jq.each(function(){
_f(this,false);
});
},disable:function(jq){
return jq.each(function(){
_f(this,true);
});
},readonly:function(jq,_2e){
return jq.each(function(){
_e(this,_2e);
});
},check:function(jq){
return jq.each(function(){
_d(this,true);
});
},uncheck:function(jq){
return jq.each(function(){
_d(this,false);
});
},clear:function(jq){
return jq.each(function(){
_d(this,false);
});
},reset:function(jq){
return jq.each(function(){
var _2f=$(this).checkbox("options");
_d(this,_2f.originalChecked);
});
}};
$.fn.checkbox.parseOptions=function(_30){
var t=$(_30);
return $.extend({},$.parser.parseOptions(_30,["label","labelPosition","labelAlign",{labelWidth:"number"}]),{value:(t.val()||undefined),checked:(t.attr("checked")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined)});
};
$.fn.checkbox.defaults={width:20,height:20,value:null,disabled:false,readonly:false,checked:false,label:null,labelWidth:"auto",labelPosition:"before",labelAlign:"left",onChange:function(_31){
}};
})(jQuery);

View File

@ -0,0 +1,414 @@
/**
* EasyUI for jQuery 1.9.14
*
* Copyright (c) 2009-2021 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
$(function(){
$(document)._unbind(".combo")._bind("mousedown.combo mousewheel.combo",function(e){
var p=$(e.target).closest("span.combo,div.combo-p,div.menu");
if(p.length){
_1(p);
return;
}
$("body>div.combo-p>div.combo-panel:visible").panel("close");
});
});
function _2(_3){
var _4=$.data(_3,"combo");
var _5=_4.options;
if(!_4.panel){
_4.panel=$("<div class=\"combo-panel\"></div>").appendTo("html>body");
_4.panel.panel({minWidth:_5.panelMinWidth,maxWidth:_5.panelMaxWidth,minHeight:_5.panelMinHeight,maxHeight:_5.panelMaxHeight,doSize:false,closed:true,cls:"combo-p",style:{position:"absolute",zIndex:10},onOpen:function(){
var _6=$(this).panel("options").comboTarget;
var _7=$.data(_6,"combo");
if(_7){
_7.options.onShowPanel.call(_6);
}
},onBeforeClose:function(){
_1($(this).parent());
},onClose:function(){
var _8=$(this).panel("options").comboTarget;
var _9=$(_8).data("combo");
if(_9){
_9.options.onHidePanel.call(_8);
}
}});
}
var _a=$.extend(true,[],_5.icons);
if(_5.hasDownArrow){
_a.push({iconCls:"combo-arrow",handler:function(e){
_10(e.data.target);
}});
}
$(_3).addClass("combo-f").textbox($.extend({},_5,{icons:_a,onChange:function(){
}}));
$(_3).attr("comboName",$(_3).attr("textboxName"));
_4.combo=$(_3).next();
_4.combo.addClass("combo");
_4.panel._unbind(".combo");
for(var _b in _5.panelEvents){
_4.panel._bind(_b+".combo",{target:_3},_5.panelEvents[_b]);
}
};
function _c(_d){
var _e=$.data(_d,"combo");
var _f=_e.options;
var p=_e.panel;
if(p.is(":visible")){
p.panel("close");
}
if(!_f.cloned){
p.panel("destroy");
}
$(_d).textbox("destroy");
};
function _10(_11){
var _12=$.data(_11,"combo").panel;
if(_12.is(":visible")){
var _13=_12.combo("combo");
_14(_13);
if(_13!=_11){
$(_11).combo("showPanel");
}
}else{
var p=$(_11).closest("div.combo-p").children(".combo-panel");
$("div.combo-panel:visible").not(_12).not(p).panel("close");
$(_11).combo("showPanel");
}
$(_11).combo("textbox").focus();
};
function _1(_15){
$(_15).find(".combo-f").each(function(){
var p=$(this).combo("panel");
if(p.is(":visible")){
p.panel("close");
}
});
};
function _16(e){
var _17=e.data.target;
var _18=$.data(_17,"combo");
var _19=_18.options;
if(!_19.editable){
_10(_17);
}else{
var p=$(_17).closest("div.combo-p").children(".combo-panel");
$("div.combo-panel:visible").not(p).each(function(){
var _1a=$(this).combo("combo");
if(_1a!=_17){
_14(_1a);
}
});
}
};
function _1b(e){
var _1c=e.data.target;
var t=$(_1c);
var _1d=t.data("combo");
var _1e=t.combo("options");
_1d.panel.panel("options").comboTarget=_1c;
switch(e.keyCode){
case 38:
_1e.keyHandler.up.call(_1c,e);
break;
case 40:
_1e.keyHandler.down.call(_1c,e);
break;
case 37:
_1e.keyHandler.left.call(_1c,e);
break;
case 39:
_1e.keyHandler.right.call(_1c,e);
break;
case 13:
e.preventDefault();
_1e.keyHandler.enter.call(_1c,e);
return false;
case 9:
case 27:
_14(_1c);
break;
default:
if(_1e.editable){
if(_1d.timer){
clearTimeout(_1d.timer);
}
_1d.timer=setTimeout(function(){
var q=t.combo("getText");
if(_1d.previousText!=q){
_1d.previousText=q;
t.combo("showPanel");
_1e.keyHandler.query.call(_1c,q,e);
t.combo("validate");
}
},_1e.delay);
}
}
};
function _1f(e){
var _20=e.data.target;
var _21=$(_20).data("combo");
if(_21.timer){
clearTimeout(_21.timer);
}
};
function _22(_23){
var _24=$.data(_23,"combo");
var _25=_24.combo;
var _26=_24.panel;
var _27=$(_23).combo("options");
var _28=_26.panel("options");
_28.comboTarget=_23;
if(_28.closed){
_26.panel("panel").show().css({zIndex:($.fn.menu?$.fn.menu.defaults.zIndex++:($.fn.window?$.fn.window.defaults.zIndex++:99)),left:-999999});
_26.panel("resize",{width:(_27.panelWidth?_27.panelWidth:_25._outerWidth()),height:_27.panelHeight});
_26.panel("panel").hide();
_26.panel("open");
}
(function(){
if(_28.comboTarget==_23&&_26.is(":visible")){
_26.panel("move",{left:_29(),top:_2a()});
setTimeout(arguments.callee,200);
}
})();
function _29(){
var _2b=_25.offset().left;
if(_27.panelAlign=="right"){
_2b+=_25._outerWidth()-_26._outerWidth();
}
if(_2b+_26._outerWidth()>$(window)._outerWidth()+$(document).scrollLeft()){
_2b=$(window)._outerWidth()+$(document).scrollLeft()-_26._outerWidth();
}
if(_2b<0){
_2b=0;
}
return _2b;
};
function _2a(){
if(_27.panelValign=="top"){
var top=_25.offset().top-_26._outerHeight();
}else{
if(_27.panelValign=="bottom"){
var top=_25.offset().top+_25._outerHeight();
}else{
var top=_25.offset().top+_25._outerHeight();
if(top+_26._outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
top=_25.offset().top-_26._outerHeight();
}
if(top<$(document).scrollTop()){
top=_25.offset().top+_25._outerHeight();
}
}
}
return top;
};
};
function _14(_2c){
var _2d=$.data(_2c,"combo").panel;
_2d.panel("close");
};
function _2e(_2f,_30){
var _31=$.data(_2f,"combo");
var _32=$(_2f).textbox("getText");
if(_32!=_30){
$(_2f).textbox("setText",_30);
}
_31.previousText=_30;
};
function _33(_34){
var _35=$.data(_34,"combo");
var _36=_35.options;
var _37=$(_34).next();
var _38=[];
_37.find(".textbox-value").each(function(){
_38.push($(this).val());
});
if(_36.multivalue){
return _38;
}else{
return _38.length?_38[0].split(_36.separator):_38;
}
};
function _39(_3a,_3b){
var _3c=$.data(_3a,"combo");
var _3d=_3c.combo;
var _3e=$(_3a).combo("options");
if(!$.isArray(_3b)){
_3b=_3b.split(_3e.separator);
}
var _3f=_33(_3a);
_3d.find(".textbox-value").remove();
if(_3b.length){
if(_3e.multivalue){
for(var i=0;i<_3b.length;i++){
_40(_3b[i]);
}
}else{
_40(_3b.join(_3e.separator));
}
}
function _40(_41){
var _42=$(_3a).attr("textboxName")||"";
var _43=$("<input type=\"hidden\" class=\"textbox-value\">").appendTo(_3d);
_43.attr("name",_42);
if(_3e.disabled){
_43.attr("disabled","disabled");
}
_43.val(_41);
};
var _44=(function(){
if(_3e.onChange==$.parser.emptyFn){
return false;
}
if(_3f.length!=_3b.length){
return true;
}
for(var i=0;i<_3b.length;i++){
if(_3b[i]!=_3f[i]){
return true;
}
}
return false;
})();
if(_44){
$(_3a).val(_3b.join(_3e.separator));
if(_3e.multiple){
_3e.onChange.call(_3a,_3b,_3f);
}else{
_3e.onChange.call(_3a,_3b[0],_3f[0]);
}
$(_3a).closest("form").trigger("_change",[_3a]);
}
};
function _45(_46){
var _47=_33(_46);
return _47[0];
};
function _48(_49,_4a){
_39(_49,[_4a]);
};
function _4b(_4c){
var _4d=$.data(_4c,"combo").options;
var _4e=_4d.onChange;
_4d.onChange=$.parser.emptyFn;
if(_4d.multiple){
_39(_4c,_4d.value?_4d.value:[]);
}else{
_48(_4c,_4d.value);
}
_4d.onChange=_4e;
};
$.fn.combo=function(_4f,_50){
if(typeof _4f=="string"){
var _51=$.fn.combo.methods[_4f];
if(_51){
return _51(this,_50);
}else{
return this.textbox(_4f,_50);
}
}
_4f=_4f||{};
return this.each(function(){
var _52=$.data(this,"combo");
if(_52){
$.extend(_52.options,_4f);
if(_4f.value!=undefined){
_52.options.originalValue=_4f.value;
}
}else{
_52=$.data(this,"combo",{options:$.extend({},$.fn.combo.defaults,$.fn.combo.parseOptions(this),_4f),previousText:""});
if(_52.options.multiple&&_52.options.value==""){
_52.options.originalValue=[];
}else{
_52.options.originalValue=_52.options.value;
}
}
_2(this);
_4b(this);
});
};
$.fn.combo.methods={options:function(jq){
var _53=jq.textbox("options");
return $.extend($.data(jq[0],"combo").options,{width:_53.width,height:_53.height,disabled:_53.disabled,readonly:_53.readonly});
},cloneFrom:function(jq,_54){
return jq.each(function(){
$(this).textbox("cloneFrom",_54);
$.data(this,"combo",{options:$.extend(true,{cloned:true},$(_54).combo("options")),combo:$(this).next(),panel:$(_54).combo("panel")});
$(this).addClass("combo-f").attr("comboName",$(this).attr("textboxName"));
});
},combo:function(jq){
return jq.closest(".combo-panel").panel("options").comboTarget;
},panel:function(jq){
return $.data(jq[0],"combo").panel;
},destroy:function(jq){
return jq.each(function(){
_c(this);
});
},showPanel:function(jq){
return jq.each(function(){
_22(this);
});
},hidePanel:function(jq){
return jq.each(function(){
_14(this);
});
},clear:function(jq){
return jq.each(function(){
$(this).textbox("setText","");
var _55=$.data(this,"combo").options;
if(_55.multiple){
$(this).combo("setValues",[]);
}else{
$(this).combo("setValue","");
}
});
},reset:function(jq){
return jq.each(function(){
var _56=$.data(this,"combo").options;
if(_56.multiple){
$(this).combo("setValues",_56.originalValue);
}else{
$(this).combo("setValue",_56.originalValue);
}
});
},setText:function(jq,_57){
return jq.each(function(){
_2e(this,_57);
});
},getValues:function(jq){
return _33(jq[0]);
},setValues:function(jq,_58){
return jq.each(function(){
_39(this,_58);
});
},getValue:function(jq){
return _45(jq[0]);
},setValue:function(jq,_59){
return jq.each(function(){
_48(this,_59);
});
}};
$.fn.combo.parseOptions=function(_5a){
var t=$(_5a);
return $.extend({},$.fn.textbox.parseOptions(_5a),$.parser.parseOptions(_5a,["separator","panelAlign",{panelWidth:"number",hasDownArrow:"boolean",delay:"number",reversed:"boolean",multivalue:"boolean",selectOnNavigation:"boolean"},{panelMinWidth:"number",panelMaxWidth:"number",panelMinHeight:"number",panelMaxHeight:"number"}]),{panelHeight:(t.attr("panelHeight")=="auto"?"auto":parseInt(t.attr("panelHeight"))||undefined),multiple:(t.attr("multiple")?true:undefined)});
};
$.fn.combo.defaults=$.extend({},$.fn.textbox.defaults,{inputEvents:{click:_16,keydown:_1b,paste:_1b,drop:_1b,blur:_1f},panelEvents:{mousedown:function(e){
e.preventDefault();
e.stopPropagation();
}},panelWidth:null,panelHeight:300,panelMinWidth:null,panelMaxWidth:null,panelMinHeight:null,panelMaxHeight:null,panelAlign:"left",panelValign:"auto",reversed:false,multiple:false,multivalue:true,selectOnNavigation:true,separator:",",hasDownArrow:true,delay:200,keyHandler:{up:function(e){
},down:function(e){
},left:function(e){
},right:function(e){
},enter:function(e){
},query:function(q,e){
}},onShowPanel:function(){
},onHidePanel:function(){
},onChange:function(_5b,_5c){
}});
})(jQuery);

Some files were not shown because too many files have changed in this diff Show More