a:56:{s:9:"#provides";s:19:"dijit.InlineEditBox";s:9:"#resource";s:16:"InlineEditBox.js";s:9:"#requires";a:5:{i:0;a:3:{i:0;s:6:"common";i:1;s:9:"dojo.i18n";i:2;s:4:"dojo";}i:1;a:2:{i:0;s:6:"common";i:1;s:13:"dijit._Widget";}i:2;a:2:{i:0;s:6:"common";i:1;s:16:"dijit._Container";}i:3;a:2:{i:0;s:6:"common";i:1;s:17:"dijit.form.Button";}i:4;a:2:{i:0;s:6:"common";i:1;s:18:"dijit.form.TextBox";}}s:19:"dijit.InlineEditBox";a:7:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:1:{i:0;s:13:"dijit._Widget";}}s:7:"summary";s:27:"Sets up private arrays etc.";s:11:"description";s:768:"Behavior for an existing node (`

`, `

`, ``, etc.) so that when you click it, an editor shows up in place of the original text. Optionally, Save and Cancel button are displayed below the edit widget. When Save is clicked, the text is pulled from the edit widget and redisplayed and the edit widget is again hidden. By default a plain Textarea widget is used as the editor (or for inline values a TextBox), but you can specify an editor such as dijit.Editor (for editing HTML) or a Slider (for adjusting a number). An edit widget must support the following API to be used: - displayedValue or value as initialization parameter, and available through attr('displayedValue') / attr('value') - void focus() - DOM-node focusNode = node containing editable text";s:6:"source";s:25:" this.editorParams = {};";s:4:"tags";s:7:"private";s:9:"classlike";b:1;}s:27:"dijit.InlineEditBox.editing";a:5:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:8:"instance";s:19:"dijit.InlineEditBox";s:4:"tags";a:1:{i:0;s:8:"readonly";}s:4:"type";s:7:"Boolean";s:7:"summary";s:35:"Is the node currently in edit mode?";}s:28:"dijit.InlineEditBox.autoSave";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:7:"Boolean";s:7:"summary";s:112:"Changing the value automatically saves it; don't have to push save button (and save button isn't even displayed)";}s:30:"dijit.InlineEditBox.buttonSave";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"String";s:7:"summary";s:17:"Save button label";}s:32:"dijit.InlineEditBox.buttonCancel";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"String";s:7:"summary";s:19:"Cancel button label";}s:32:"dijit.InlineEditBox.renderAsHtml";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:7:"Boolean";s:7:"summary";s:122:"Set this to true if the specified Editor's value should be interpreted as HTML rather than plain text (ex: `dijit.Editor`)";}s:26:"dijit.InlineEditBox.editor";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"String";s:7:"summary";s:28:"Class name for Editor widget";}s:32:"dijit.InlineEditBox.editorParams";a:4:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"Object";s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:28:"dijit.InlineEditBox.onChange";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:98:" // summary: // Set this handler to be notified of changes to value. // tags: // callback";s:7:"summary";s:52:"Set this handler to be notified of changes to value.";s:4:"tags";s:8:"callback";}s:28:"dijit.InlineEditBox.onCancel";a:5:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:104:" // summary: // Set this handler to be notified when editing is cancelled. // tags: // callback";s:7:"summary";s:58:"Set this handler to be notified when editing is cancelled.";s:4:"tags";s:8:"callback";}s:25:"dijit.InlineEditBox.width";a:3:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"String";s:7:"summary";s:62:"Width of editor. By default it's width=100% (ie, block mode).";}s:25:"dijit.InlineEditBox.value";a:4:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:8:"instance";s:19:"dijit.InlineEditBox";s:4:"type";s:6:"String";s:7:"summary";s:49:"The display value of the widget in read-only mode";}s:36:"dijit.InlineEditBox.noValueIndicator";a:4:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"tags";a:1:{i:0;s:5:"const";}s:4:"type";s:6:"String";s:7:"summary";s:99:"The text that gets displayed when there is no value (so that the user has a place to click to edit)";}s:39:"dijit.InlineEditBox.postMixInProperties";a:4:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:661:" this.inherited(arguments); // save pointer to original source node, since Widget nulls-out srcNodeRef this.displayNode = this.srcNodeRef; // connect handlers to the display node var events = { ondijitclick: "_onClick", onmouseover: "_onMouseOver", onmouseout: "_onMouseOut", onfocus: "_onMouseOver", onblur: "_onMouseOut" }; for(var name in events){ this.connect(this.displayNode, name, events[name]); } dijit.setWaiRole(this.displayNode, "button"); if(!this.displayNode.getAttribute("tabIndex")){ this.displayNode.setAttribute("tabIndex", 0); } this.attr('value', this.value || this.displayNode.innerHTML);";s:7:"summary";s:0:"";}s:31:"dijit.InlineEditBox.setDisabled";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"disabled";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:153:" dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0"); this.attr('disabled', disabled);";s:7:"summary";s:47:"Deprecated. Use attr('disable', ...) instead.";s:4:"tags";s:10:"deprecated";}s:36:"dijit.InlineEditBox._setDisabledAttr";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"disabled";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:84:" this.disabled = disabled; dijit.setWaiState(this.domNode, "disabled", disabled);";s:7:"summary";s:80:"Hook to make attr("disabled", ...) work. Set disabled state of widget.";s:7:"private";b:1;}s:32:"dijit.InlineEditBox._onMouseOver";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:107:" dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");";s:7:"summary";s:30:"Handler for onmouseover event.";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:31:"dijit.InlineEditBox._onMouseOut";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:110:" dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");";s:7:"summary";s:29:"Handler for onmouseout event.";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:28:"dijit.InlineEditBox._onClick";a:7:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:214:" if(this.disabled){ return; } if(e){ dojo.stopEvent(e); } this._onMouseOut(); // Since FF gets upset if you move a node while in an event handler for that node... setTimeout(dojo.hitch(this, "edit"), 0);";s:7:"summary";s:26:"Handler for onclick event.";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:24:"dijit.InlineEditBox.edit";a:5:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:1659:" if(this.disabled || this.editing){ return; } this.editing = true; var editValue = (this.renderAsHtml ? this.value : this.value.replace(/\s*\r?\n\s*/g,"").replace(//gi,"\n").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/"/g,"\"")); // Placeholder for edit widget // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly // when Calendar dropdown appears, which happens automatically on focus. var placeholder = dojo.create("span", null, this.domNode, "before"); var ew = this.editWidget = new dijit._InlineEditor({ value: dojo.trim(editValue), autoSave: this.autoSave, buttonSave: this.buttonSave, buttonCancel: this.buttonCancel, renderAsHtml: this.renderAsHtml, editor: this.editor, editorParams: this.editorParams, sourceStyle: dojo.getComputedStyle(this.displayNode), save: dojo.hitch(this, "save"), cancel: dojo.hitch(this, "cancel"), width: this.width }, placeholder); // to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden, // and then when it's finished rendering, we switch from display mode to editor var ews = ew.domNode.style; this.displayNode.style.display="none"; ews.position = "static"; ews.visibility = "visible"; // Replace the display widget with edit widget, leaving them both displayed for a brief time so that // focus can be shifted without incident. (browser may needs some time to render the editor.) this.domNode = ew.domNode; setTimeout(function(){ ew.focus(); ew._resetValue = ew.getValue(); }, 100);";s:7:"summary";s:70:"Display the editor widget in place of the original (read only) markup.";s:4:"tags";s:7:"private";}s:29:"dijit.InlineEditBox._showText";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"focus";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:7596:"dojo.provide("dijit.InlineEditBox"); dojo.require("dojo.i18n"); dojo.require("dijit._Widget"); dojo.require("dijit._Container"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.TextBox"); dojo.requireLocalization("dijit", "common"); dojo.declare("dijit.InlineEditBox", dijit._Widget, { // summary: // An element with in-line edit capabilitites // // description: // Behavior for an existing node (`

`, `

`, ``, etc.) so that // when you click it, an editor shows up in place of the original // text. Optionally, Save and Cancel button are displayed below the edit widget. // When Save is clicked, the text is pulled from the edit // widget and redisplayed and the edit widget is again hidden. // By default a plain Textarea widget is used as the editor (or for // inline values a TextBox), but you can specify an editor such as // dijit.Editor (for editing HTML) or a Slider (for adjusting a number). // An edit widget must support the following API to be used: // - displayedValue or value as initialization parameter, // and available through attr('displayedValue') / attr('value') // - void focus() // - DOM-node focusNode = node containing editable text // editing: [readonly] Boolean // Is the node currently in edit mode? editing: false, // autoSave: Boolean // Changing the value automatically saves it; don't have to push save button // (and save button isn't even displayed) autoSave: true, // buttonSave: String // Save button label buttonSave: "", // buttonCancel: String // Cancel button label buttonCancel: "", // renderAsHtml: Boolean // Set this to true if the specified Editor's value should be interpreted as HTML // rather than plain text (ex: `dijit.Editor`) renderAsHtml: false, // editor: String // Class name for Editor widget editor: "dijit.form.TextBox", // editorParams: Object // Set of parameters for editor, like {required: true} editorParams: {}, onChange: function(value){ // summary: // Set this handler to be notified of changes to value. // tags: // callback }, onCancel: function(){ // summary: // Set this handler to be notified when editing is cancelled. // tags: // callback }, // width: String // Width of editor. By default it's width=100% (ie, block mode). width: "100%", // value: String // The display value of the widget in read-only mode value: "", // noValueIndicator: [const] String // The text that gets displayed when there is no value (so that the user has a place to click to edit) noValueIndicator: "    ✍    ", constructor: function(){ // summary: // Sets up private arrays etc. // tags: // private this.editorParams = {}; }, postMixInProperties: function(){ this.inherited(arguments); // save pointer to original source node, since Widget nulls-out srcNodeRef this.displayNode = this.srcNodeRef; // connect handlers to the display node var events = { ondijitclick: "_onClick", onmouseover: "_onMouseOver", onmouseout: "_onMouseOut", onfocus: "_onMouseOver", onblur: "_onMouseOut" }; for(var name in events){ this.connect(this.displayNode, name, events[name]); } dijit.setWaiRole(this.displayNode, "button"); if(!this.displayNode.getAttribute("tabIndex")){ this.displayNode.setAttribute("tabIndex", 0); } this.attr('value', this.value || this.displayNode.innerHTML); }, setDisabled: function(/*Boolean*/ disabled){ // summary: // Deprecated. Use attr('disable', ...) instead. // tags: // deprecated dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0"); this.attr('disabled', disabled); }, _setDisabledAttr: function(/*Boolean*/ disabled){ // summary: // Hook to make attr("disabled", ...) work. // Set disabled state of widget. this.disabled = disabled; dijit.setWaiState(this.domNode, "disabled", disabled); }, _onMouseOver: function(){ // summary: // Handler for onmouseover event. // tags: // private dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion"); }, _onMouseOut: function(){ // summary: // Handler for onmouseout event. // tags: // private dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion"); }, _onClick: function(/*Event*/ e){ // summary: // Handler for onclick event. // tags: // private if(this.disabled){ return; } if(e){ dojo.stopEvent(e); } this._onMouseOut(); // Since FF gets upset if you move a node while in an event handler for that node... setTimeout(dojo.hitch(this, "edit"), 0); }, edit: function(){ // summary: // Display the editor widget in place of the original (read only) markup. // tags: // private if(this.disabled || this.editing){ return; } this.editing = true; var editValue = (this.renderAsHtml ? this.value : this.value.replace(/\s*\r?\n\s*/g,"").replace(//gi,"\n").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/"/g,"\"")); // Placeholder for edit widget // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly // when Calendar dropdown appears, which happens automatically on focus. var placeholder = dojo.create("span", null, this.domNode, "before"); var ew = this.editWidget = new dijit._InlineEditor({ value: dojo.trim(editValue), autoSave: this.autoSave, buttonSave: this.buttonSave, buttonCancel: this.buttonCancel, renderAsHtml: this.renderAsHtml, editor: this.editor, editorParams: this.editorParams, sourceStyle: dojo.getComputedStyle(this.displayNode), save: dojo.hitch(this, "save"), cancel: dojo.hitch(this, "cancel"), width: this.width }, placeholder); // to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden, // and then when it's finished rendering, we switch from display mode to editor var ews = ew.domNode.style; this.displayNode.style.display="none"; ews.position = "static"; ews.visibility = "visible"; // Replace the display widget with edit widget, leaving them both displayed for a brief time so that // focus can be shifted without incident. (browser may needs some time to render the editor.) this.domNode = ew.domNode; setTimeout(function(){ ew.focus(); ew._resetValue = ew.getValue(); }, 100); }, _showText: function(/*Boolean*/ focus){ // summary: // Revert to display mode, and optionally focus on display node // tags: // private // display the read-only text and then quickly hide the editor (to avoid screen jitter) this.displayNode.style.display=""; var ew = this.editWidget; var ews = ew.domNode.style; ews.position="absolute"; ews.visibility="hidden"; this.domNode = this.displayNode; if(focus){ dijit.focus(this.displayNode); } ews.display = "none"; // give the browser some time to render the display node and then shift focus to it // and hide the edit widget before garbage collecting the edit widget setTimeout(function(){ ew.destroy(); delete ew; if(dojo.isIE){ // messing with the DOM tab order can cause IE to focus the body - so restore dijit.focus(dijit.getFocus()); } }, 1000); // no hurry - wait for things to quiesce";s:7:"summary";s:60:"Revert to display mode, and optionally focus on display node";s:7:"private";b:1;}s:24:"dijit.InlineEditBox.save";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"focus";a:2:{s:4:"type";s:7:"Boolean";s:7:"summary";s:30:"Focus on the display mode text";}}s:6:"source";s:395:" if(this.disabled || !this.editing){ return; } this.editing = false; var value = this.editWidget.getValue() + ""; this.attr('value', this.renderAsHtml? value : value.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """).replace(/\n/g, "
") ); // tell the world that we have changed this.onChange(value); this._showText(focus); ";s:7:"summary";s:59:"Save the contents of the editor and revert to display mode.";s:4:"tags";s:7:"private";}s:28:"dijit.InlineEditBox.setValue";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"val";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:145:" dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0"); return this.attr("value", val);";s:7:"summary";s:45:"Deprecated. Use attr('value', ...) instead.";s:4:"tags";s:10:"deprecated";}s:33:"dijit.InlineEditBox._setValueAttr";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"val";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:91:" this.value = val; this.displayNode.innerHTML = dojo.trim(val) || this.noValueIndicator;";s:7:"summary";s:151:"Hook to make attr("value", ...) work. Inserts specified HTML value into this node, or an "input needed" character if node is blank.";s:7:"private";b:1;}s:28:"dijit.InlineEditBox.getValue";a:5:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:6:"source";s:135:" dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.", "", "2.0"); return this.attr("value");";s:7:"summary";s:40:"Deprecated. Use attr('value') instead.";s:4:"tags";s:10:"deprecated";}s:26:"dijit.InlineEditBox.cancel";a:6:{s:9:"prototype";s:19:"dijit.InlineEditBox";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"focus";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:119:" this.editing = false; // tell the world that we have no changes this.onCancel(); this._showText(focus);";s:7:"summary";s:65:"Revert to display mode, discarding any changes made in the editor";s:4:"tags";s:7:"private";}s:31:"dijit.InlineEditBox.displayNode";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:28:"dijit.InlineEditBox.disabled";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:30:"dijit.InlineEditBox.editWidget";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:45:"dijit.InlineEditBox.displayNode.style.display";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:27:"dijit.InlineEditBox.domNode";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:41:"dijit.InlineEditBox.displayNode.innerHTML";a:2:{s:8:"instance";s:19:"dijit.InlineEditBox";s:7:"summary";s:0:"";}s:19:"dijit._InlineEditor";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:13:"dijit._Widget";}s:4:"call";a:2:{i:0;s:13:"dijit._Widget";i:1;s:16:"dijit._Templated";}}s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dijit._Templated.prototype";}}s:7:"summary";s:447:"Internal widget used by InlineEditBox, displayed when in editing mode to display the editor and maybe save/cancel buttons. Calling code should connect to save/cancel methods to detect when editing is finished Has mainly the same parameters as InlineEditBox, plus these values: style: Object Set of CSS attributes of display node, to replicate in editor value: String Value as an HTML string or plain text string, depending on renderAsHTML flag";s:9:"classlike";b:1;}s:32:"dijit._InlineEditor.templatePath";a:2:{s:9:"prototype";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:37:"dijit._InlineEditor.widgetsInTemplate";a:2:{s:9:"prototype";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:39:"dijit._InlineEditor.postMixInProperties";a:4:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:234:" this.inherited(arguments); this.messages = dojo.i18n.getLocalization("dijit", "common", this.lang); dojo.forEach(["buttonSave", "buttonCancel"], function(prop){ if(!this[prop]){ this[prop] = this.messages[prop]; } }, this);";s:7:"summary";s:0:"";}s:30:"dijit._InlineEditor.postCreate";a:4:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:11873:"dojo.provide("dijit.InlineEditBox"); dojo.require("dojo.i18n"); dojo.require("dijit._Widget"); dojo.require("dijit._Container"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.TextBox"); dojo.requireLocalization("dijit", "common"); dojo.declare("dijit.InlineEditBox", dijit._Widget, { // summary: // An element with in-line edit capabilitites // // description: // Behavior for an existing node (`

`, `

`, ``, etc.) so that // when you click it, an editor shows up in place of the original // text. Optionally, Save and Cancel button are displayed below the edit widget. // When Save is clicked, the text is pulled from the edit // widget and redisplayed and the edit widget is again hidden. // By default a plain Textarea widget is used as the editor (or for // inline values a TextBox), but you can specify an editor such as // dijit.Editor (for editing HTML) or a Slider (for adjusting a number). // An edit widget must support the following API to be used: // - displayedValue or value as initialization parameter, // and available through attr('displayedValue') / attr('value') // - void focus() // - DOM-node focusNode = node containing editable text // editing: [readonly] Boolean // Is the node currently in edit mode? editing: false, // autoSave: Boolean // Changing the value automatically saves it; don't have to push save button // (and save button isn't even displayed) autoSave: true, // buttonSave: String // Save button label buttonSave: "", // buttonCancel: String // Cancel button label buttonCancel: "", // renderAsHtml: Boolean // Set this to true if the specified Editor's value should be interpreted as HTML // rather than plain text (ex: `dijit.Editor`) renderAsHtml: false, // editor: String // Class name for Editor widget editor: "dijit.form.TextBox", // editorParams: Object // Set of parameters for editor, like {required: true} editorParams: {}, onChange: function(value){ // summary: // Set this handler to be notified of changes to value. // tags: // callback }, onCancel: function(){ // summary: // Set this handler to be notified when editing is cancelled. // tags: // callback }, // width: String // Width of editor. By default it's width=100% (ie, block mode). width: "100%", // value: String // The display value of the widget in read-only mode value: "", // noValueIndicator: [const] String // The text that gets displayed when there is no value (so that the user has a place to click to edit) noValueIndicator: "    ✍    ", constructor: function(){ // summary: // Sets up private arrays etc. // tags: // private this.editorParams = {}; }, postMixInProperties: function(){ this.inherited(arguments); // save pointer to original source node, since Widget nulls-out srcNodeRef this.displayNode = this.srcNodeRef; // connect handlers to the display node var events = { ondijitclick: "_onClick", onmouseover: "_onMouseOver", onmouseout: "_onMouseOut", onfocus: "_onMouseOver", onblur: "_onMouseOut" }; for(var name in events){ this.connect(this.displayNode, name, events[name]); } dijit.setWaiRole(this.displayNode, "button"); if(!this.displayNode.getAttribute("tabIndex")){ this.displayNode.setAttribute("tabIndex", 0); } this.attr('value', this.value || this.displayNode.innerHTML); }, setDisabled: function(/*Boolean*/ disabled){ // summary: // Deprecated. Use attr('disable', ...) instead. // tags: // deprecated dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0"); this.attr('disabled', disabled); }, _setDisabledAttr: function(/*Boolean*/ disabled){ // summary: // Hook to make attr("disabled", ...) work. // Set disabled state of widget. this.disabled = disabled; dijit.setWaiState(this.domNode, "disabled", disabled); }, _onMouseOver: function(){ // summary: // Handler for onmouseover event. // tags: // private dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion"); }, _onMouseOut: function(){ // summary: // Handler for onmouseout event. // tags: // private dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion"); }, _onClick: function(/*Event*/ e){ // summary: // Handler for onclick event. // tags: // private if(this.disabled){ return; } if(e){ dojo.stopEvent(e); } this._onMouseOut(); // Since FF gets upset if you move a node while in an event handler for that node... setTimeout(dojo.hitch(this, "edit"), 0); }, edit: function(){ // summary: // Display the editor widget in place of the original (read only) markup. // tags: // private if(this.disabled || this.editing){ return; } this.editing = true; var editValue = (this.renderAsHtml ? this.value : this.value.replace(/\s*\r?\n\s*/g,"").replace(//gi,"\n").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/"/g,"\"")); // Placeholder for edit widget // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly // when Calendar dropdown appears, which happens automatically on focus. var placeholder = dojo.create("span", null, this.domNode, "before"); var ew = this.editWidget = new dijit._InlineEditor({ value: dojo.trim(editValue), autoSave: this.autoSave, buttonSave: this.buttonSave, buttonCancel: this.buttonCancel, renderAsHtml: this.renderAsHtml, editor: this.editor, editorParams: this.editorParams, sourceStyle: dojo.getComputedStyle(this.displayNode), save: dojo.hitch(this, "save"), cancel: dojo.hitch(this, "cancel"), width: this.width }, placeholder); // to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden, // and then when it's finished rendering, we switch from display mode to editor var ews = ew.domNode.style; this.displayNode.style.display="none"; ews.position = "static"; ews.visibility = "visible"; // Replace the display widget with edit widget, leaving them both displayed for a brief time so that // focus can be shifted without incident. (browser may needs some time to render the editor.) this.domNode = ew.domNode; setTimeout(function(){ ew.focus(); ew._resetValue = ew.getValue(); }, 100); }, _showText: function(/*Boolean*/ focus){ // summary: // Revert to display mode, and optionally focus on display node // tags: // private // display the read-only text and then quickly hide the editor (to avoid screen jitter) this.displayNode.style.display=""; var ew = this.editWidget; var ews = ew.domNode.style; ews.position="absolute"; ews.visibility="hidden"; this.domNode = this.displayNode; if(focus){ dijit.focus(this.displayNode); } ews.display = "none"; // give the browser some time to render the display node and then shift focus to it // and hide the edit widget before garbage collecting the edit widget setTimeout(function(){ ew.destroy(); delete ew; if(dojo.isIE){ // messing with the DOM tab order can cause IE to focus the body - so restore dijit.focus(dijit.getFocus()); } }, 1000); // no hurry - wait for things to quiesce }, save: function(/*Boolean*/ focus){ // summary: // Save the contents of the editor and revert to display mode. // focus: Boolean // Focus on the display mode text // tags: // private if(this.disabled || !this.editing){ return; } this.editing = false; var value = this.editWidget.getValue() + ""; this.attr('value', this.renderAsHtml? value : value.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """).replace(/\n/g, "
") ); // tell the world that we have changed this.onChange(value); this._showText(focus); }, setValue: function(/*String*/ val){ // summary: // Deprecated. Use attr('value', ...) instead. // tags: // deprecated dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0"); return this.attr("value", val); }, _setValueAttr: function(/*String*/ val){ // summary: // Hook to make attr("value", ...) work. // Inserts specified HTML value into this node, or an "input needed" character if node is blank. this.value = val; this.displayNode.innerHTML = dojo.trim(val) || this.noValueIndicator; }, getValue: function(){ // summary: // Deprecated. Use attr('value') instead. // tags: // deprecated dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.", "", "2.0"); return this.attr("value"); }, cancel: function(/*Boolean*/ focus){ // summary: // Revert to display mode, discarding any changes made in the editor // tags: // private this.editing = false; // tell the world that we have no changes this.onCancel(); this._showText(focus); } }); dojo.declare( "dijit._InlineEditor", [dijit._Widget, dijit._Templated], { // summary: // Internal widget used by InlineEditBox, displayed when in editing mode // to display the editor and maybe save/cancel buttons. Calling code should // connect to save/cancel methods to detect when editing is finished // // Has mainly the same parameters as InlineEditBox, plus these values: // // style: Object // Set of CSS attributes of display node, to replicate in editor // // value: String // Value as an HTML string or plain text string, depending on renderAsHTML flag templatePath: dojo.moduleUrl("dijit", "templates/InlineEditBox.html"), widgetsInTemplate: true, postMixInProperties: function(){ this.inherited(arguments); this.messages = dojo.i18n.getLocalization("dijit", "common", this.lang); dojo.forEach(["buttonSave", "buttonCancel"], function(prop){ if(!this[prop]){ this[prop] = this.messages[prop]; } }, this); }, postCreate: function(){ // Create edit widget in place in the template var cls = dojo.getObject(this.editor); // Copy the style from the source // Don't copy ALL properties though, just the necessary/applicable ones var srcStyle = this.sourceStyle; var editStyle = "line-height:" + srcStyle.lineHeight + ";"; dojo.forEach(["Weight","Family","Size","Style"], function(prop){ editStyle += "font-"+prop+":"+srcStyle["font"+prop]+";"; }, this); dojo.forEach(["marginTop","marginBottom","marginLeft", "marginRight"], function(prop){ this.domNode.style[prop] = srcStyle[prop]; }, this); if(this.width=="100%"){ // block mode editStyle += "width:100%;"; this.domNode.style.display = "block"; }else{ // inline-block mode editStyle += "width:" + (this.width + (Number(this.width)==this.width ? "px" : "")) + ";"; } this.editorParams.style = editStyle; this.editorParams[ "displayedValue" in cls.prototype ? "displayedValue" : "value"] = this.value; var ew = this.editWidget = new cls(this.editorParams, this.editorPlaceholder); this.connect(ew, "onChange", "_onChange"); // Monitor keypress on the edit widget. Note that edit widgets do a stopEvent() on ESC key (to // prevent Dialog from closing when the user just wants to revert the value in the edit widget), // so this is the only way we can see the key press event. this.connect(ew, "onKeyPress", "_onKeyPress"); this.connect(ew, "onKeyUp", "_onKeyPress"); // in case ESC was eaten but changed value if(this.autoSave){ this.buttonContainer.style.display="none"; }";s:7:"summary";s:0:"";}s:27:"dijit._InlineEditor.destroy";a:4:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:57:" this.editWidget.destroy(); this.inherited(arguments);";s:7:"summary";s:0:"";}s:28:"dijit._InlineEditor.getValue";a:4:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:98:" var ew = this.editWidget; return ew.attr("displayedValue" in ew ? "displayedValue" : "value");";s:7:"summary";s:45:"Return the [display] value of the edit widget";}s:31:"dijit._InlineEditor._onKeyPress";a:8:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1476:" if(this._exitInProgress){ return; } if(this.autoSave){ if(e.altKey || e.ctrlKey){ return; } // If Enter/Esc pressed, treat as save/cancel. if(e.charOrCode == dojo.keys.ESCAPE){ dojo.stopEvent(e); this._exitInProgress = true; this.cancel(true); }else if(e.charOrCode == dojo.keys.ENTER && this.editWidget.focusNode.tagName == "INPUT"){ dojo.stopEvent(e); this._exitInProgress = true; this.save(true); }else if(e.charOrCode === dojo.keys.TAB){ this._exitInProgress = true; // allow the TAB to change focus before we mess with the DOM: #6227 // Expounding by request: // The current focus is on the edit widget input field. // save() will hide and destroy this widget. // We want the focus to jump from the currently hidden // displayNode, but since it's hidden, it's impossible to // unhide it, focus it, and then have the browser focus // away from it to the next focusable element since each // of these events is asynchronous and the focus-to-next-element // is already queued. // So we allow the browser time to unqueue the move-focus event // before we do all the hide/show stuff. setTimeout(dojo.hitch(this, "save", false), 0); } }else{ var _this = this; // Delay before calling getValue(). // The delay gives the browser a chance to update the native value. setTimeout( function(){ _this._onChange(); // handle save button }, 100); }";s:7:"summary";s:52:"Handler for keypress in the edit box (see template).";s:11:"description";s:154:"For autoSave widgets, if Esc/Enter, call cancel/save. For non-autoSave widgets, enable save button if the text value is different than the original value.";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:27:"dijit._InlineEditor._onBlur";a:6:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:391:" this.inherited(arguments); if(this._exitInProgress){ // when user clicks the "save" button, focus is shifted back to display text, causing this // function to be called, but in that case don't do anything return; } if(this.autoSave){ this._exitInProgress = true; if(this.getValue() == this._resetValue){ this.cancel(false); }else{ this.save(false); } }";s:7:"summary";s:42:"Called when focus moves outside the editor";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:29:"dijit._InlineEditor._onChange";a:6:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:617:" if(this._exitInProgress){ // TODO: the onChange event might happen after the return key for an async widget // like FilteringSelect. Shouldn't be deleting the edit widget on end-of-edit return; } if(this.autoSave){ this._exitInProgress = true; this.save(true); }else{ // in case the keypress event didn't get through (old problem with Textarea that has been fixed // in theory) or if the keypress event comes too quickly and the value inside the Textarea hasn't // been updated yet) this.saveButton.attr("disabled", (this.getValue() == this._resetValue) || !this.enableSave()); }";s:7:"summary";s:116:"Called when the underlying widget fires an onChange event, which means that the user has finished entering the value";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:30:"dijit._InlineEditor.enableSave";a:5:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:68:" return this.editWidget.isValid ? this.editWidget.isValid() : true;";s:7:"summary";s:137:"User overridable function returning a Boolean to indicate if the Save button should be enabled or not - usually due to invalid conditions";s:4:"tags";s:9:"extension";}s:25:"dijit._InlineEditor.focus";a:4:{s:9:"prototype";s:19:"dijit._InlineEditor";s:4:"type";s:8:"Function";s:6:"source";s:78:" this.editWidget.focus(); dijit.selectInputText(this.editWidget.focusNode);";s:7:"summary";s:25:"Focus on the edit widget.";}s:28:"dijit._InlineEditor.messages";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:25:"dijit._InlineEditor.width";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:41:"dijit._InlineEditor.domNode.style.display";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:38:"dijit._InlineEditor.editorParams.style";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:30:"dijit._InlineEditor.editWidget";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:49:"dijit._InlineEditor.buttonContainer.style.display";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:35:"dijit._InlineEditor._exitInProgress";a:3:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:48:"dijit._InlineEditor.editWidget.focusNode.tagName";a:2:{s:8:"instance";s:19:"dijit._InlineEditor";s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}