Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\js\edeal\managers\edManager.js
edManager = { options: { INPUT_SUFFIX: "____VIEW" }, getViewByID: function(sID) { if (this.edViews.length > 0) { var oView = this.edViews.get(sID); if (oView) { return oView.get("view"); } else { oView = this.edViews.get(sID + this.options.INPUT_SUFFIX); if (oView) { return oView.get("view"); } else { return null; } } } else { return null; } }, getGroupByID: function(sID) { if (this.edGroups.length > 0) { var oGroup = this.edGroups.get(sID); if (oGroup) return oGroup.get("group"); else return null; } else { return null; } }, registerView: function(view, edHtml) { this.edViews.remove(view.id); this.edViews.add({edHtml: $(this), view: view, id: view.id}); }, unRegisterView: function(view) { this.edViews.remove(view.id); }, unRegisterViewByID: function(viewId) { this.edViews.remove(viewId); }, createEdViewsFromHTML: function(viewToSearchIn) { var edSelector; this.suspendEdInputTagTimer(); if (typeof viewToSearchIn === "undefined") { selector = $(document); } else { selector = viewToSearchIn.$el; } //for(var j=0; j<edApplication().edTagsList.length;j++) { for(var attrname in edApplication().edTagsList) { var tempSelector; tempSelector = $(attrname, selector); if (tempSelector.length > 0) { if (!edSelector) { edSelector = tempSelector; } else { for(var k=0; k<tempSelector.length;k++) { edSelector.push(tempSelector[k]); } } } } if (edSelector) { var that = this; this.mustlaunchallviewrenderedevent = true; edSelector.each(function(index) { var edTag = edApplication().edTagsList[this.tagName]; var initialTag = $(this); var attr = edManager.HTMLAttributesToParameters(initialTag[0].attributes, edTag); //this view is potentially currently loading, so skip it var skipView = false; if (attr.id) { if (edManager.getViewByID(attr.id)) { skipView = true; } } if (!skipView) { if (attr.compatibilitymode) { attr.id = attr.id + that.options.INPUT_SUFFIX; } //attr.descriptor = edApplication().edTagsList[this.tagName]; attr.model = attr.values; attr.parentel = $(this).parent(); attr.parentview = viewToSearchIn; attr.initialTag = initialTag; var view; var app = edApplication(); if (attr.ismultivalued) { view = new edTag.viewList["view"](attr); //id: sID, descriptor:ED.Descriptor[this.tagName], isAsync: bIsAsync, wsParameters: sWsParameters, wsUrl:sWsUrl, parentEl: parentEl, parentView:viewToSearchIn, extendedProperties: extendedProperties, useParentPropertyAsModel:sUseParentPropertyAsModel, useParentPropertyAsModelPossibleValues: sUseParentPropertyAsModelPossibleValues, model: modelValue, modelPossibleValues: modelPossibleValues, accessMode:that.options.ACCESS_MODE, isRequired: bRequired, isReadOnly: bReadOnly, toolTip: sTooltip, group: sGroup, groupOptions: groupOptionsModel, childViewsInDifferentGroups: bChildViewsInDifferentGroups, dontShowAfterLoading: bDontShowAfterLoading, placeHolder: sPlaceHolder, isScrollable: bScrollable,otherAttributes: otherAttrs, labels: arrLabels, isValuesSortable: bValuesSortable, isValuesRemovable: bValuesRemovable, isShowAddButton: bIsShowAddButton, actionsPanelPosition: sActionsPanelPosition}); } else { view = new edTag["view"](attr);// id: sID, descriptor:ED.Descriptor[this.tagName], isAsync: bIsAsync, wsParameters: sWsParameters, wsUrl:sWsUrl, parentEl: parentEl, parentView:viewToSearchIn, extendedProperties: extendedProperties,useParentPropertyAsModel:sUseParentPropertyAsModel, useParentPropertyAsModelPossibleValues: sUseParentPropertyAsModelPossibleValues, model: modelValue, modelPossibleValues: modelPossibleValues, accessMode:that.options.ACCESS_MODE, isRequired: bRequired, isReadOnly: bReadOnly, toolTip: sTooltip, group: sGroup, groupOptions: groupOptionsModel, childViewsInDifferentGroups: bChildViewsInDifferentGroups, dontShowAfterLoading: bDontShowAfterLoading, placeHolder: sPlaceHolder, isScrollable: bScrollable, otherAttributes: otherAttrs, labels: arrLabels, isValuesSortable: bValuesSortable, isValuesRemovable: bValuesRemovable, isShowAddButton: bIsShowAddButton, actionsPanelPosition: sActionsPanelPosition}); } if (!attr.model.cid) { attr.model.cid = view.id; if (!attr.model.cid) { attr.model.cid = view.cid; } } //$(this).empty().remove(); if (view) { edManager.registerView(view, $(this)); if (viewToSearchIn) { viewToSearchIn.options.childviews.add({cid: view.cid, id: view.id, view: view}); } } $(document).trigger("view_" + view.id + "_created"); if (!attr.async) { view.render(); } } }); } else { if (!viewToSearchIn) { if (this.mustlaunchallviewrenderedevent) { this.firstonallviewsrenderedtriggered = true; this.mustlaunchallviewrenderedevent = false; $(document).trigger("onallviewsrendered"); } else { if (!this.firstonallviewsrenderedtriggered) { this.firstonallviewsrenderedtriggered = true; $(document).trigger("onallviewsrendered"); } } } } this.manageEdInputTagTimer(); /*if (this.groups) { this.groups.each(function (groupList){ groupList.get("group").applyOptions(); }); }*/ }, suspendEdInputTagTimer: function() { if (this.edTagTimer) { window.clearInterval(this.edTagTimer); } }, manageEdInputTagTimer: function() { this.edTagTimer = setInterval(function(){ edManager.createEdViewsFromHTML(); }, 1000); }, HTMLAttributesToParameters: function(htmlAttributes, edTag) { var optionsToReturn = {}; optionsToReturn["specifiedAttributes"] = []; for(var i=0;i<htmlAttributes.length;i++) { if (htmlAttributes[i].specified) { optionsToReturn[htmlAttributes[i].nodeName.toLowerCase()] = htmlAttributes[i].nodeValue; } } optionsToReturn["specifiedEvents"] = {}; for (var attrname in optionsToReturn) { if (attrname == "values") { optionsToReturn[attrname] = this.stringToModel(edTag.viewList["model"], edTag["model"], optionsToReturn[attrname], optionsToReturn.ismultivalued, optionsToReturn.isuriencoded); } else if (attrname == "possiblevalues") { optionsToReturn[attrname] = this.stringToModel(edTag["possibleValueCollection"], edTag["possibleValue"], optionsToReturn[attrname], true, false); } else if (attrname.substr(0, 2) == "on") { optionsToReturn["specifiedEvents"][attrname] = optionsToReturn[attrname]; } else { optionsToReturn[attrname] = this.stringToObject(optionsToReturn[attrname]); if (attrname != "specifiedAttributes" && attrname != "specifiedEvents" && attrname != "class") { optionsToReturn["specifiedAttributes"].push(attrname); } } } if (!optionsToReturn["values"]) { optionsToReturn["values"] = this.stringToModel(edTag.viewList["model"], edTag["model"], "", optionsToReturn.ismultivalued, optionsToReturn.isuriencoded); } return optionsToReturn; }, stringToModel: function(collectionType, modelType, str, isMultiValued, isURIEncoded) { //if str is a number, JSON.parse will correctly parse it... we don't want that var strToParse = str; if (str != "") { strToParse = Number(str); if (!isNaN(strToParse)) { strToParse = '{"value": "' + str + '"}'; } else { strToParse = str; } } if (strToParse != "") { try { var parsedValues = JSON.parse(strToParse.replace(/'/g,"\\'")); } catch(e) { var parsedValues = JSON.parse('{"value": "' + strToParse.replace(/\"/g,'\\\"').replace(/'/g,"\\'") + '"}'); } } else { parsedValues = ""; } if (isMultiValued) { var modelValue = new collectionType();// new Models.ValueCollection(); if (parsedValues != "") { if (!$.isArray(parsedValues)) { if (isURIEncoded) { parsedValues.value = decodeURIComponent(parsedValues.value); } modelValue.add(new modelType(parsedValues)); } else { for (var j=0; j<parsedValues.length;j++) { if (isURIEncoded) { parsedValues[j].value = decodeURIComponent(parsedValues[j].value); } modelValue.add(new modelType(parsedValues[j])); } } } } else { if (isURIEncoded) { parsedValues.value = decodeURIComponent(parsedValues.value); } var modelValue = new modelType(parsedValues); } return modelValue; }, stringToObject: function(str) { /*try { str = str.replace(/\n/g,""); } catch(e) { }*/ try { var parsedValues = JSON.parse(str); } catch(e) { return str; } return parsedValues; } };
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de