Skip to content
Browse files

gallery-2014.01.03-22-50 ItsAsbreuk gallery-itsaviewmodel

  • Loading branch information...
1 parent d89dee1 commit 9cdbbdc1be2bedb024ef44022862442137c0c678 @clarle clarle committed Jan 3, 2014
Showing with 686 additions and 227 deletions.
  1. +29 −0 build/gallery-itsaviewmodel/assets/gallery-itsaviewmodel-core.css
  2. +1 −1 build/gallery-itsaviewmodel/assets/skins/sam/gallery-itsaviewmodel.css
  3. +2 −2 build/gallery-itsaviewmodel/gallery-itsaviewmodel-coverage.js
  4. +135 −57 build/gallery-itsaviewmodel/gallery-itsaviewmodel-debug.js
  5. +4 −4 build/gallery-itsaviewmodel/gallery-itsaviewmodel-min.js
  6. +118 −41 build/gallery-itsaviewmodel/gallery-itsaviewmodel.js
  7. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel.js
  8. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ar.js
  9. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bg.js
  10. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bs.js
  11. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_cs.js
  12. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_da.js
  13. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_de.js
  14. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_en.js
  15. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_es.js
  16. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fa.js
  17. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fi.js
  18. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fr.js
  19. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_he.js
  20. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hi.js
  21. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hr.js
  22. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hu.js
  23. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_it.js
  24. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ja.js
  25. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nb.js
  26. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nl.js
  27. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pl.js
  28. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pt.js
  29. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ru.js
  30. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sk.js
  31. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sr.js
  32. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sv.js
  33. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_uk.js
  34. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_zh.js
  35. +29 −0 src/gallery-itsaviewmodel/assets/gallery-itsaviewmodel/gallery-itsaviewmodel-core.css
  36. +14 −0 src/gallery-itsaviewmodel/docs/partials/changing-template-css.mustache
  37. +1 −1 src/gallery-itsaviewmodel/docs/partials/forms-css.mustache
  38. +7 −4 src/gallery-itsaviewmodel/docs/partials/forms-js.mustache
  39. +3 −4 src/gallery-itsaviewmodel/docs/partials/loaderconfig-js.mustache
  40. +8 −1 src/gallery-itsaviewmodel/docs/partials/promised-syncing-js.mustache
  41. +1 −1 src/gallery-itsaviewmodel/docs/promised-syncing.mustache
  42. +133 −56 src/gallery-itsaviewmodel/js/gallery-itsaviewmodel.js
  43. +1 −1 src/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nl.js
  44. +2 −1 src/gallery-itsaviewmodel/list/assets/gallery-itsaviewmodellist/gallery-itsaviewmodellist-core.css
  45. +8 −0 src/gallery-itsaviewmodel/logs/tests.json
  46. +1 −0 src/gallery-itsaviewmodel/logs/yogi.stderr.log
  47. +96 −0 src/gallery-itsaviewmodel/logs/yogi.stdout.log
  48. +5 −0 src/gallery-itsaviewmodel/meta/gallery-itsaviewmodel.json
  49. +7 −0 src/gallery-itsaviewmodel/panel/docs/advanced-form.mustache
  50. +3 −0 src/gallery-itsaviewmodel/panel/docs/partials/advanced-form-css.mustache
  51. +28 −17 src/gallery-itsaviewmodel/panel/docs/partials/advanced-form-js.mustache
  52. +1 −1 src/gallery-itsaviewmodel/panel/docs/partials/loaderconfig-js.mustache
  53. +8 −1 src/gallery-itsaviewmodel/panel/docs/partials/promised-syncing-js.mustache
  54. +1 −1 src/gallery-itsaviewmodel/panel/docs/promised-syncing.mustache
  55. +12 −5 src/gallery-itsaviewmodel/panel/js/gallery-itsaviewmodelpanel.js
View
29 build/gallery-itsaviewmodel/assets/gallery-itsaviewmodel-core.css
@@ -47,6 +47,35 @@
transition: 0.05s linear box-shadow;
}
+.itsaviewmodel .pure-form div[data-type="editorBase"] {
+ display: inline-block;
+ height: 10em;
+ border: 1px solid #ccc;
+ box-shadow: inset 0 1px 3px #ddd;
+ border-radius: 4px;
+ -webkit-transition: 0.3s linear border;
+ -moz-transition: 0.3s linear border;
+ -ms-transition: 0.3s linear border;
+ -o-transition: 0.3s linear border;
+ transition: 0.3s linear border;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.itsaviewmodel .pure-form div[data-type="editorBase"].itsa-focused {
+ outline: 0;
+ outline: thin dotted \9; /* IE6-9 */
+ border-color: #129FEA;
+}
+
+.itsaviewmodel .pure-form-aligned div[data-type="editorBase"] {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+ width: 14em;
+}
+
/* speed-up Transitions-time pure-inputs from 0.3s to 0.1s */
.itsaviewmodel .pure-form input[type="text"],
.itsaviewmodel .pure-form input[type="password"],
View
2 build/gallery-itsaviewmodel/assets/skins/sam/gallery-itsaviewmodel.css
@@ -1 +1 @@
-.itsaviewmodel{overflow-y:hidden;overflow-x:hidden;position:relative}.itsaviewmodel-styled{border:solid 1px #CCC;padding:1.3em 1.1em .3em;background-color:#edf5ff;-webkit-box-shadow:5px 5px 6px rgba(50,50,50,0.45);-moz-box-shadow:5px 5px 6px rgba(50,50,50,0.45);box-shadow:5px 5px 6px rgba(50,50,50,0.45)}.itsaviewmodel .itsaview-wrapper{width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.itsaviewmodel.itsa-button-capitalize button{text-transform:capitalize}.itsaviewmodel.itsa-button-uppercase button{text-transform:uppercase}.itsaviewmodel.itsa-button-lowercase button{text-transform:lowercase}.itsaviewmodel button+button,.itsaviewmodel button+button{margin-left:.5em}.itsaviewmodel .pure-button{-webkit-transition:.05s linear -webkit-box-shadow;-moz-transition:.05s linear -moz-box-shadow;-ms-transition:.05s linear box-shadow;-o-transition:.05s linear box-shadow;transition:.05s linear box-shadow}.itsaviewmodel .pure-form input[type="text"],.itsaviewmodel .pure-form input[type="password"],.itsaviewmodel .pure-form input[type="email"],.itsaviewmodel .pure-form input[type="url"],.itsaviewmodel .pure-form input[type="date"],.itsaviewmodel .pure-form input[type="month"],.itsaviewmodel .pure-form input[type="time"],.itsaviewmodel .pure-form input[type="datetime"],.itsaviewmodel .pure-form input[type="datetime-local"],.itsaviewmodel .pure-form input[type="week"],.itsaviewmodel .pure-form input[type="number"],.itsaviewmodel .pure-form input[type="search"],.itsaviewmodel .pure-form input[type="tel"],.itsaviewmodel .pure-form input[type="color"],.itsaviewmodel .pure-form select,.itsaviewmodel .pure-form textarea{-webkit-transition:.15s linear border;-moz-transition:.15s linear border;-ms-transition:.15s linear border;-o-transition:.15s linear border;transition:.15s linear border}.itsaview-statusbar{position:absolute;bottom:0;width:100%}.itsaviewmodel[data-itsastatusbar="true"]{padding-bottom:1.6em}.itsaviewmodel.itsaviewmodel-styled[data-itsastatusbar="true"]{padding-bottom:1.6em;overflow-y:hidden}.itsaviewmodel-styled .itsaview-statusbar{margin-left:-1.1em}.itsaview-statusbar .itsa-statusbar-container{height:1.5em;line-height:1.6em}#yui3-css-stamp.skin-sam-gallery-itsaviewmodel{display:none}
+.itsaviewmodel{overflow-y:hidden;overflow-x:hidden;position:relative}.itsaviewmodel-styled{border:solid 1px #CCC;padding:1.3em 1.1em .3em;background-color:#edf5ff;-webkit-box-shadow:5px 5px 6px rgba(50,50,50,0.45);-moz-box-shadow:5px 5px 6px rgba(50,50,50,0.45);box-shadow:5px 5px 6px rgba(50,50,50,0.45)}.itsaviewmodel .itsaview-wrapper{width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.itsaviewmodel.itsa-button-capitalize button{text-transform:capitalize}.itsaviewmodel.itsa-button-uppercase button{text-transform:uppercase}.itsaviewmodel.itsa-button-lowercase button{text-transform:lowercase}.itsaviewmodel button+button,.itsaviewmodel button+button{margin-left:.5em}.itsaviewmodel .pure-button{-webkit-transition:.05s linear -webkit-box-shadow;-moz-transition:.05s linear -moz-box-shadow;-ms-transition:.05s linear box-shadow;-o-transition:.05s linear box-shadow;transition:.05s linear box-shadow}.itsaviewmodel .pure-form div[data-type="editorBase"]{display:inline-block;height:10em;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-transition:.3s linear border;-moz-transition:.3s linear border;-ms-transition:.3s linear border;-o-transition:.3s linear border;transition:.3s linear border;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.itsaviewmodel .pure-form div[data-type="editorBase"].itsa-focused{outline:0;outline:thin dotted \9;border-color:#129fea}.itsaviewmodel .pure-form-aligned div[data-type="editorBase"]{display:inline-block;*display:inline;*zoom:1;width:14em}.itsaviewmodel .pure-form input[type="text"],.itsaviewmodel .pure-form input[type="password"],.itsaviewmodel .pure-form input[type="email"],.itsaviewmodel .pure-form input[type="url"],.itsaviewmodel .pure-form input[type="date"],.itsaviewmodel .pure-form input[type="month"],.itsaviewmodel .pure-form input[type="time"],.itsaviewmodel .pure-form input[type="datetime"],.itsaviewmodel .pure-form input[type="datetime-local"],.itsaviewmodel .pure-form input[type="week"],.itsaviewmodel .pure-form input[type="number"],.itsaviewmodel .pure-form input[type="search"],.itsaviewmodel .pure-form input[type="tel"],.itsaviewmodel .pure-form input[type="color"],.itsaviewmodel .pure-form select,.itsaviewmodel .pure-form textarea{-webkit-transition:.15s linear border;-moz-transition:.15s linear border;-ms-transition:.15s linear border;-o-transition:.15s linear border;transition:.15s linear border}.itsaview-statusbar{position:absolute;bottom:0;width:100%}.itsaviewmodel[data-itsastatusbar="true"]{padding-bottom:1.6em}.itsaviewmodel.itsaviewmodel-styled[data-itsastatusbar="true"]{padding-bottom:1.6em;overflow-y:hidden}.itsaviewmodel-styled .itsaview-statusbar{margin-left:-1.1em}.itsaview-statusbar .itsa-statusbar-container{height:1.5em;line-height:1.6em}#yui3-css-stamp.skin-sam-gallery-itsaviewmodel{display:none}
View
4 build/gallery-itsaviewmodel/gallery-itsaviewmodel-coverage.js
2 additions, 2 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
192 build/gallery-itsaviewmodel/gallery-itsaviewmodel-debug.js
@@ -1125,7 +1125,7 @@ ITSAViewModel.prototype.removePrimaryButton = function() {
* @since 0.3
*
*/
-ITSAViewModel.prototype.render = function (clear) {
+ITSAViewModel.prototype.render = function (clear, modelchange) {
var instance = this,
container = instance.get(CONTAINER),
model = instance.get(MODEL),
@@ -1136,6 +1136,21 @@ ITSAViewModel.prototype.render = function (clear) {
html = (clear || !model) ? '' : instance._modelRenderer(model),
withfocusmanager;
Y.log('render', 'info', 'ITSA-ViewModel');
+/*jshint expr:true */
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+
+ // WELL: it seems we cannot call cleanup in no cases at all --> after *:change the view will be rerendered and
+ // this seems to lead into buttons not listening to click (empty model-internals)
+ // THUS: commented next line:
+
+// modelchange && !instance.get('partOfMultiView') && model && model.toJSONUI && model.cleanup();
+
+
+
+/*jshint expr:false */
// Render this view's HTML into the container element.
// Because Y.Node.setHTML DOES NOT destroy its nodes (!) but only remove(), we destroy them ourselves first
if (editMode || instance._isMicroTemplate) {
@@ -1145,7 +1160,13 @@ ITSAViewModel.prototype.render = function (clear) {
container.cleanup(instance._rendered);
}
else {
- container.cleanup(false);
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+ if (!modelchange || !instance.get('partOfMultiView')) {
+ container.cleanup(false);
+ }
}
// Append the container element to the DOM if it's not on the page already.
if (!instance._rendered) {
@@ -1586,11 +1607,12 @@ ITSAViewModel.prototype._bindUI = function() {
container = instance.get(CONTAINER),
eventhandlers = instance._eventhandlers;
Y.log('_bindUI', 'info', 'ITSA-ViewModel');
+
eventhandlers.push(
instance.after(
MODEL+CHANGE,
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
var prevVal = e.prevVal,
newVal = e.newVal,
prevFormModel = prevVal && prevVal.toJSONUI,
@@ -1611,7 +1633,6 @@ ITSAViewModel.prototype._bindUI = function() {
);
}
}
-
(prevFormModel !== newFormModel) && newFormModel && instance.get(TEMPLATE) && instance._setTemplateRenderer();
/*jshint expr:false */
instance.render();
@@ -1622,7 +1643,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
TEMPLATE+CHANGE,
function() {
- Y.log('aftersubscriptor templateChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor templateChange', 'info', 'ITSA-ViewModel');
if (instance.get(MODEL)) {
instance._setTemplateRenderer();
instance.render();
@@ -1638,9 +1659,9 @@ ITSAViewModel.prototype._bindUI = function() {
);
eventhandlers.push(
instance.after(
- RESET,
+ '*:'+RESET,
function() {
- Y.log('aftersubscriptor reset', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor reset', 'info', 'ITSA-ViewModel');
if (instance._isMicroTemplate) {
// need to re-render because the code might have made items visible/invisible based on their value
instance.render();
@@ -1659,7 +1680,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
EDITABLE+CHANGE,
function() {
- Y.log('aftersubscriptor editableChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor editableChange', 'info', 'ITSA-ViewModel');
var model = instance.get(MODEL);
// if model.toJSONUI exists, then we need to rerender
if (instance.get(TEMPLATE) && model && model.toJSONUI) {
@@ -1673,9 +1694,9 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
'*:change',
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
- if ((e.target instanceof Y.Model) && !instance.get(EDITABLE)) {
- instance.render();
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
+ if (e.target instanceof Y.Model) {
+ instance.render(false, true);
}
}
)
@@ -1686,7 +1707,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.on(
'*:datepickerclick',
function() {
- Y.log('onsubscriptor *:datepickerclick', 'info', 'ITSA-ViewModelPanel');
+ Y.log('onsubscriptor *:datepickerclick', 'info', 'ITSA-ViewModel');
instance.lockView();
instance.once('*:'+FOCUS_NEXT, function() {
instance.unlockView();
@@ -1697,9 +1718,16 @@ ITSAViewModel.prototype._bindUI = function() {
instance.get('partOfMultiView') || eventhandlers.push(
instance.on(
+ '*:'+RESET,
+ Y.bind(instance._disableSaveBtns, instance)
+ )
+ );
+
+ instance.get('partOfMultiView') || eventhandlers.push(
+ instance.on(
['*:'+SUBMIT, '*:'+SAVE, '*:'+LOAD, '*:'+DESTROY],
function(e) {
- Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModel');
var promise = e.promise,
model = e.target,
eventType = e.type.split(':')[1],
@@ -1709,43 +1737,58 @@ ITSAViewModel.prototype._bindUI = function() {
destroyWithoutRemove = ((eventType===DESTROY) && options && (options.remove || options[DELETE])),
prevAttrs;
if (!destroyWithoutRemove && (model instanceof Y.Model)) {
- instance._lockedBefore = instance._locked;
- instance.lockView(true);
if ((eventType===SUBMIT) || (eventType===SAVE)) {
prevAttrs = model.getAttrs();
- model.UIToModel();
+ instance.get(EDITABLE) && model.UIToModel();
+ }
+ if ((eventType!==SAVE) || (model.isModified())) {
+ instance._lockedBefore = instance._locked;
+ instance.lockView(true);
+ statusbar || instance._setSpin(eventType, true);
+ (eventType===DESTROY) || promise.then(
+ function() {
+ ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
+ },
+ function() {
+ ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
+ return true; // make promise fulfilled
+ }
+ ).then(
+ function() {
+ statusbar || instance._setSpin(eventType, false);
+ instance._lockedBefore || instance.unlockView();
+ (eventType===SUBMIT) || instance._disableSaveBtns();
+ container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
+ function(itsatabkeymanager) {
+ itsatabkeymanager.focusInitialItem();
+ }
+ );
+ }
+ );
+ }
+ else {
+ (eventType===SAVE) && instance._disableSaveBtns();
}
- statusbar || instance._setSpin(eventType, true);
- (eventType===DESTROY) || promise.then(
- function() {
- ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
- },
- function() {
- ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
- return true; // make promise fulfilled
- }
- ).then(
- function() {
- statusbar || instance._setSpin(eventType, false);
- instance._lockedBefore || instance.unlockView();
- container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
- function(itsatabkeymanager) {
- itsatabkeymanager.focusInitialItem();
- }
- );
- }
- );
}
}
)
);
/*jshint expr:false */
eventhandlers.push(
+ instance.on(
+ '*:nodeChange', // cones from EditorBase
+ function(e) {
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
+ instance._enableSaveBtns();
+ }
+ )
+ );
+ eventhandlers.push(
instance.after(
'*:destroy',
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
if (e.target instanceof Y.Model) {
instance.render(true);
}
@@ -1756,7 +1799,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
CONTAINER+CHANGE,
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
instance._contIsForm = (e.newVal.get(TAGNAME)===FORM_CAPITALIZED);
}
)
@@ -1765,7 +1808,7 @@ ITSAViewModel.prototype._bindUI = function() {
container.after(
CLICK,
function() {
- Y.log('container aftersubscriptor click', 'info', 'ITSA-ViewModelPanel');
+ Y.log('container aftersubscriptor click', 'info', 'ITSA-ViewModel');
container.addClass(FOCUSED_CLASS); // do not call focus(), because the tabkeymanager will set focus to UI itself: don't do this twice
}
)
@@ -1774,7 +1817,7 @@ ITSAViewModel.prototype._bindUI = function() {
container.after(
CLICKOUTSIDE,
function() {
- Y.log('container aftersubscriptor clickoutsie', 'info', 'ITSA-ViewModelPanel');
+ Y.log('container aftersubscriptor clickoutsie', 'info', 'ITSA-ViewModel');
container.removeClass(FOCUSED_CLASS);
}
)
@@ -1783,7 +1826,7 @@ ITSAViewModel.prototype._bindUI = function() {
Y.Intl.after( // subscribe to the after event, so the formmodel gets updated sooner: that one is subscribing the on-event
'intl:lang'+CHANGE,
function() {
- Y.log('Y.Intl aftersubscriptor intl:langChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('Y.Intl aftersubscriptor intl:langChange', 'info', 'ITSA-ViewModel');
instance._intl = Y.Intl.get(GALLERY+ITSAVIEWMODEL);
instance.render();
}
@@ -1793,7 +1836,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
STYLED+CHANGE,
function(e) {
- Y.log('aftersubscriptor styledChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor styledChange', 'info', 'ITSA-ViewModel');
container.toggleClass(ITSAVIEWMODEL+'-'+STYLED, e.newVal);
}
)
@@ -1802,7 +1845,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
FOCUSMANAGED+CHANGE,
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
instance._setFocusManager(e.newVal);
}
)
@@ -1812,19 +1855,27 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
BUTTONTRANSFORM+CHANGE,
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
instance._setButtonTransform(e.newVal);
}
)
);
+
+ eventhandlers.push(
+ instance.after(
+ UI_CHANGED,
+ Y.bind(instance._enableSaveBtns, instance)
+ )
+ );
+
YArray.each(
[CLICK, VALIDATION_ERROR, UI_CHANGED, FOCUS_NEXT],
function(event) {
eventhandlers.push(
instance.on(
'*:'+event,
function(e) {
- Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModel');
var validEvent = true,
newevent = event,
payload, button;
@@ -2118,7 +2169,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: BTN_SAVE,
type: SAVE,
- config: {value: SAVE, hotkey: hotkeys[BTN_SAVE]},
+ config: {classname: PURE_BUTTON_DISABLED, value: SAVE, hotkey: hotkeys[BTN_SAVE]},
labelHTML: function() { return customBtnLabels[BTN_SAVE] ? Lang.sub(customBtnLabels[BTN_SAVE], {label: instance._intl[SAVE]}) : instance._intl[SAVE]; }
},
{
@@ -2202,7 +2253,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: IMGBTN_SAVE,
type: SAVE,
- config: {classname: BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[IMGBTN_SAVE]},
+ config: {classname: PURE_BUTTON_DISABLED+' '+BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[IMGBTN_SAVE]},
labelHTML: function() { return customBtnLabels[IMGBTN_SAVE] ? Lang.sub(customBtnLabels[IMGBTN_SAVE], {label: instance._intl[SAVE]}) : (Lang.sub(IMAGE_BUTTON_TEMPLATE, {type: SAVE})+instance._intl[SAVE]); }
},
{
@@ -2232,7 +2283,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: SPINBTN_SAVE,
type: SAVE,
- config: {spinbusy: true, classname: BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[SPINBTN_SAVE]},
+ config: {spinbusy: true, classname: PURE_BUTTON_DISABLED+' '+BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[SPINBTN_SAVE]},
labelHTML: function() { return customBtnLabels[SPINBTN_SAVE] ? Lang.sub(customBtnLabels[SPINBTN_SAVE], {label: instance._intl[SAVE]}) : (Lang.sub(IMAGE_BUTTON_TEMPLATE, {type: SAVE})+instance._intl[SAVE]); }
},
{
@@ -2298,6 +2349,32 @@ ITSAViewModel.prototype[DEF_FN+VALIDATION_ERROR] = function(e) {
};
/**
+ * Disables 'save-buttons' when the model UI-elements gets in initial state
+ *
+ * @method _disableSaveBtns
+ * @private
+ * @since 0.4
+*/
+ITSAViewModel.prototype._disableSaveBtns = function() {
+ var instance = this,
+ saveButtons = instance.get(CONTAINER).all('button[data-buttonsubtype="save"]');
+ saveButtons.addClass(PURE_BUTTON_DISABLED);
+};
+
+/**
+ * Enables 'save-buttons' that were disabled when the model UI-elements were in initial state
+ *
+ * @method _enableSaveBtns
+ * @private
+ * @since 0.4
+*/
+ITSAViewModel.prototype._enableSaveBtns = function() {
+ var instance = this,
+ saveButtons = instance.get(CONTAINER).all('button[data-buttonsubtype="save"]');
+ saveButtons.removeClass(PURE_BUTTON_DISABLED);
+};
+
+/**
* Sets the right className to the container for making text-transForm of buttons. Configured by attribute 'buttonTransform'.<br />
* Either one of these values:
* <ul>
@@ -2422,20 +2499,20 @@ ITSAViewModel.prototype._setSpin = function(buttonType, spin) {
ITSAViewModel.prototype._setTemplateRenderer = function() {
var instance = this,
template = instance.get(TEMPLATE),
- editTemplate = instance.get(EDITABLE),
+ editMode = instance.get(EDITABLE),
isMicroTemplate, ismicrotemplate, compiledModelEngine, buttonsToJSON;
Y.log('_clearEventhandlers', 'info', 'ITSA-ViewModel');
isMicroTemplate = function() {
var microTemplateRegExp = /<%(.+)%>/;
return microTemplateRegExp.test(template);
};
- buttonsToJSON = function(jsondata, model) {
+ buttonsToJSON = function(jsondata, model, micro) {
var propertykey, type, labelHTML, config, propertyEmbraced;
YArray.each(
instance._buttons,
function(buttonobject) {
propertykey = buttonobject.propertykey;
- propertyEmbraced = new RegExp('{'+propertykey+'}');
+ propertyEmbraced = micro ? (new RegExp('<%==? (data|this).'+propertykey+' %>')) : (new RegExp('{'+propertykey+'}'));
if (propertyEmbraced.test(template)) {
type = buttonobject.type;
labelHTML = buttonobject.labelHTML(); // is a function!
@@ -2448,7 +2525,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
YObject.each(
instance._customBtns,
function(buttonobject, propertykey) {
- propertyEmbraced = new RegExp('{'+propertykey+'}');
+ propertyEmbraced = micro ? (new RegExp('<%==? (data|this).'+propertykey+' %>')) : (new RegExp('{'+propertykey+'}'));
if (propertyEmbraced.test(template)) {
labelHTML = buttonobject.labelHTML; // is a property
config = buttonobject.config;
@@ -2461,19 +2538,19 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
if (ismicrotemplate) {
compiledModelEngine = YTemplateMicro.compile(template);
instance._modelRenderer = function(model) {
- var jsondata = editTemplate ? model.toJSONUI(null, template) : instance.toJSON();
+ var jsondata = editMode ? model.toJSONUI(null, template) : instance.toJSON();
// if model is instance of Y.ITSAFormModel, then add the btn_buttontype-properties:
/*jshint expr:true */
- model.toJSONUI && buttonsToJSON(jsondata, model);
+ model.toJSONUI && buttonsToJSON(jsondata, model, true);
/*jshint expr:false */
return compiledModelEngine(jsondata);
};
}
else {
instance._modelRenderer = function(model) {
- var jsondata = editTemplate ? model.toJSONUI(null, template) : instance.toJSON();
+ var jsondata = editMode ? model.toJSONUI(null, template) : instance.toJSON();
/*jshint expr:true */
- model.toJSONUI && buttonsToJSON(jsondata, model);
+ model.toJSONUI && buttonsToJSON(jsondata, model, false);
/*jshint expr:false */
return Lang.sub(template, jsondata);
};
@@ -2483,7 +2560,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
instance._viewNeedsForm = !instance._contIsForm && !(/<form([^>]*)>/.test(template));
};
-}, '@VERSION@', {
+}, 'gallery-2014.01.03-22-50', {
"requires": [
"yui-base",
"gallery-itsapluginpromise",
@@ -2501,6 +2578,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
"event-custom-base",
"oop",
"promise",
+ "json",
"pluginhost-base",
"gallery-itsamodulesloadedpromise",
"gallerycss-itsa-base"
View
8 build/gallery-itsaviewmodel/gallery-itsaviewmodel-min.js
@@ -1,4 +1,4 @@
-YUI.add("gallery-itsaviewmodel",function(e,t){"use strict";function wn(){}var n,r=4e3,i=e.Lang,s=e.Array,o=e.Object,u=e.Intl,a="itsa",f=a+"-",l="pure-form",c=l+" "+l+"-aligned",h=a+"button-iconleft",p='<i class="itsaicon-form-{type}"></i>',d=e.Template.Micro,v="FORM",m="template",g="Change",y="tagName",b="gallery-",w=a+"viewmodel",E=f+"focused",S="styled",x="button",T="model",N="Save",C="Submit",k="Load",L="Destroy",A="Reset",O="Promise",M="destroyed",_="delete",D="_defFn_",P="status",H=P+"bar",B=P+"Bar",j="boolean",F="string",I="editable",q="container",R="viewrendered",U="_defPrevFn_",z=a+"tabkeymanager",W="focusManaged",X="disabled",V="data-itsa"+H,$="pure-"+x+"-"+X,J={button:!0,destroy:!0,remove:!0,reset:!0,save:!0,submit:!0,load:!0},K={btn_abort:!0,btn_cancel:!0,btn_close:!0,btn_destroy:!0,btn_ignore:!0,btn_load:!0,btn_no:!0,btn_ok:!0,btn_remove:!0,btn_reset:!0,btn_retry:!0,btn_save:!0,btn_submit:!0,btn_yes:!0,imgbtn_abort:!0,imgbtn_cancel:!0,imgbtn_close:!0,imgbtn_destroy:!0,imgbtn_ignore:!0,imgbtn_load:!0,imgbtn_no:!0,imgbtn_ok:!0,imgbtn_remove:!0,imgbtn_reset:!0,imgbtn_retry:!0,imgbtn_save:!0,imgbtn_submit:!0,imgbtn_yes:!0,spinbtn_load:!0,spinbtn_remove:!0,spinbtn_save:!0,spinbtn_submit:!0},Q="destroy",G="remove",Y="load",Z="reset",et="save",tt="submit",nt="click",rt=nt+"outside",it="abort",st="cancel",ot="close",ut="ignore",at="no",ft="ok",lt="retry",ct="yes",ht="btn_",pt=ht+it,dt=ht+st,vt=ht+ot,mt=ht+Q,gt=ht+ut,yt=ht+Y,bt=ht+at,wt=ht+ft,Et=ht+G,St=ht+Z,xt=ht+lt,Tt=ht+et,Nt=ht+tt,Ct=ht+ct,kt="img",Lt=kt+pt,At=kt+dt,Ot=kt+vt,Mt=kt+mt,_t=kt+gt,Dt=kt+yt,Pt=kt+bt,Ht=kt+wt,Bt=kt+Et,jt=kt+St,Ft=kt+xt,It=kt+Tt,qt=kt+Nt,Rt=kt+Ct,Ut="spin",zt=Ut+yt,Wt=Ut+Et,Xt=Ut+Tt,Vt=Ut+Nt,$t="uppercase",Jt="lowercase",Kt="capitalize",Qt=f+x+"-",Gt=Qt+$t,Yt=Qt+Jt,Zt=Qt+Kt,en=x+"Transform",tn=b+a+H,nn=b+a+T+"syncpromise",rn="itsaview-",sn=rn+H,on="</div>",un='<div class="'+sn+'">'+on,an='<div class="'+rn+'wrapper">',fn="focusnext",ln="validationerror",cn="uichanged",hn=x+nt,pn=x+ot,dn=Q+nt,vn=G+nt,mn=Y+nt,gn=tt+nt,yn=Z+nt,bn=et+nt;e.mix(wn.prototype,{cleanupWidgets:function(t){var n=this,r=e.Widget;r&&n.all(".yui3-widget").each(function(e){if(n.one("#"+e.get("id"))){var i=r.getByNode(e);i&&i.destroy(t)}})},cleanup:function(e){var t=this;e&&t.cleanupWidgets(!0),t.get("childNodes").destroy(!0)}},!0),e.Node.ITSANodeCleanup=wn,e.Base.mix(e.Node,[wn]),n=e.ITSAViewModel=e.Base.create(w,e.View,[],{},{ATTRS:{buttonTransform:{value:null,validator:function(e){return e===null||e===$t||e===Jt||e===Kt}},editable:{value:!1,validator:function(e){return typeof e===j},getter:function(e){var t=this.get(T);return e&&t&&t.toJSONUI}},focusManaged:{value:!0,validator:function(e){return typeof e===j}},model:{value:{},validator:function(t){return t===null||i.isObject(t)||typeof t===F||t instanceof e.Model},setter:"_setModel"},partOfMultiView:{value:!1,initOnly:!0,validator:function(e){return typeof e===j}},statusBar:{value:!1,validator:function(e){return typeof e===j}},styled:{value:!0,validator:function(e){return typeof e===j}},template:{value:null,validator:function(e){return typeof e===F},getter:function(e){var t=this;return t._textTemplate||(e===null?t.warnNoTemplate?t._intl.undefined_template:"":e)}}}}),n.prototype._formcss_loaded=!1,n.prototype.initializer=function(){var t=this,n=t.get(T),r;r=t._renderPromise=new e.Promise(function(e){t._renderPromiseResolve=e}),t._intl=u.get(b+w),t.warnNoTemplate=!0,s.each([dn,vn,yn,bn,gn,hn,mn,cn],function(n){t[U+n]=function(e){e.modelEventFacade.preventDefault()},t.publish(n,{preventedFn:e.bind(t[U+n],t),emitFacade:!0})}),t.publish(fn,{defaultFn:e.bind(t[D+fn],t),emitFacade:!0}),t.publish(ln,{defaultFn:e.bind(t[D+ln],t),preventedFn:e.bind(t[U+ln],t),emitFacade:!0}),t._eventhandlers=[],t._contIsForm=t.get(q).get(y)===v,n&&n.addTarget&&n.addTarget(t),n&&t.get(m)&&t._setTemplateRenderer(),t._customBtns={},t._hotkeys={},t._customBtnLabels={},t._createButtons()},n.prototype.addCustomBtn=function(e,t,n){var r=this;K[e]||(r._customBtns[e]={config:n,labelHTML:t||e})},n.prototype.addCustomBtns=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonId&&e.labelHTML&&t.addCustomBtn(e.buttonId,e.labelHTML,e.config)})},n.prototype.addMessageTarget=function(e){var t=this.get(T);t&&t.addMessageTarget&&t.addMessageTarget(e)},n.prototype.blur=function(){this.get(q).removeClass(E)},n.prototype.focus=function(){var e=this,t=e.get(q);e.isRendered().then(function(){t.addClass(E),t.pluginReady(z,r).then(function(e){e._retrieveFocus()})})},n.prototype.focusInitialItem=function(){var e=this,t=e.get(q);return t.pluginReady(z,r).then(function(e){t.addClass(E),e.focusInitialItem()})},n.prototype.isRendered=function(){return this._renderPromise},n.prototype.lockView=function(){var e=this,t=e.get(T),n=arguments[0],r=e.get(I)&&t&&t.toJSONUI;r?t.disableUI():e.get(q).all("button").addClass($),n||(e._locked=!0)},n.prototype.removeButtonLabel=function(e){var t=this;e?delete t._customBtnLabels[e]:t._customBtnLabels={}},n.prototype.removeCustomBtn=function(e){var t=this;delete this._customBtns[e],e?delete t._customBtns[e]:t._customBtns={}},n.prototype.removeHotKey=function(e){var t=this;e?delete t._hotkeys[e]:t._hotkeys={},t._createButtons()},n.prototype.removeMessageTarget=function(){var e=this.get(T);e&&e.removeMessageTarget&&e.removeMessageTarget()},n.prototype.removePrimaryButton=function(){var e=this,t=e._buttons;s.each(t,function(e){e.config.primary=!1})},n.prototype.render=function(t){var n=this,r=n.get(q),i=n.get(T),s=n.get(I),o=n.get(B),u=n._itsastatusbar,a=e.Global.ItsaDateTimePicker,f=t||!i?"":n._modelRenderer(i),l;return s||n._isMicroTemplate?(s&&(n._initialEditAttrs=i.getAttrs()),r.cleanup(n._rendered)):r.cleanup(!1),n._rendered||(r.inDoc()||(n._newContainer=!0)&&e.one("body").append(r),r.addClass(w),r.toggleClass(w+"-"+S,n.get(S)),n._setButtonTransform(n.get(en)),n._bindUI()),n._rendered=!0,f.length>0&&s&&n._viewNeedsForm&&(f=(o?an:"")+'<form class="'+c+'">'+f+"</form>"+(o?on:"")),o&&(u||(f+=un)),r
-.setHTML(f),o?(r.setAttribute(V,"true"),u?r.append(u.get("parentNode")):e.usePromise(tn).then(function(){var t=r.one("."+sn);u=n._itsastatusbar=new e.ITSAStatusbar({parentNode:t}),n._viewName=u._viewName,i&&e.batch(e.usePromise(nn),u.isReady()).then(function(){i.addMessageTarget(n._itsastatusbar)}),n._repositionStatusbar()})):(r.removeAttribute(V),n._viewName=null),l=s&&n.get(W),n._setFocusManager(l),l?e.usePromise(b+z).then(function(){n._renderPromiseResolve(),n.fire(R,{target:n})}):(n._renderPromiseResolve(),n.fire(R,{target:n})),a&&a.panel.get("visible")&&a.hide(!0),n},n.prototype.setButtonLabel=function(e,t){var n=this;K[e]&&typeof t===F&&t.length>0&&(n._customBtnLabels[e]=t)},n.prototype.setButtonLabels=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonType&&e.labelHTML&&t.setButtonLabel(e.buttonType,e.labelHTML)})},n.prototype.setHotKey=function(e,t){var n=this;K[e]&&(typeof t===F||i.isObject(t))&&(n._hotkeys[e]=t)&&n._createButtons()},n.prototype.setHotKeys=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonType&&e.hotkey&&t.setHotKey(e.buttonType,e.hotkey)})},n.prototype.setPrimaryButton=function(e){var t=this,n=t._buttons;K[e]&&s.each(n,function(t){t.config.primary=t.propertykey===e})},n.prototype.toJSON=function(){var t=this.get(T);return t instanceof e.Model?t.toJSON():t},n.prototype.translate=function(e){return this._intl[e]||e},n.translatePromise=function(t){return e.usePromise("intl").then(function(){var e=u.get(b+w);return e[t]||t},function(){return t})},n.prototype.translatePromise=n.translatePromise,n.prototype.unlockView=function(){var e=this,t=e.get(T),n=e.get(I)&&t&&t.toJSONUI;n?t.enableUI():e.get(q).all("button").removeClass($),e._locked=!1},n.prototype.destructor=function(){var e=this,t=e.get(T),n=e._itsastatusbar,r=e.get(q);t&&t.removeTarget&&t.removeTarget(e),e._itsastatusbar=null,n&&(t&&t.removeMessageTarget(n),n.destroy()),e._clearEventhandlers(),e._customBtns={},e._customBtnLabels={},e._hotkeys={},r.empty(),e._newContainer?r.remove(!0):(r.removeClass(w+"-"+S),r.destroy(!0))},n.prototype._bindUI=function(){var t=this,n=t.get(q),i=t._eventhandlers;i.push(t.after(T+g,function(n){var r=n.prevVal,i=n.newVal,s=r&&r.toJSONUI,o=i&&i.toJSONUI,u=t.get(B);r&&(r.removeTarget&&r.removeTarget(t),u&&r.removeMessageTarget(t._itsastatusbar)),i&&(i.addTarget&&i.addTarget(t),u&&e.usePromise(nn).then(function(){i.addMessageTarget(t._itsastatusbar)})),s!==o&&o&&t.get(m)&&t._setTemplateRenderer(),t.render()})),i.push(t.after(m+g,function(){t.get(T)&&(t._setTemplateRenderer(),t.render())})),i.push(t.after(B+g,e.bind(t.render,t))),i.push(t.after(Z,function(){t._isMicroTemplate?t.render():n.pluginReady(z,r).then(function(e){e.focusInitialItem()})})),i.push(t.after(I+g,function(){var e=t.get(T);t.get(m)&&e&&e.toJSONUI&&(t._setTemplateRenderer(),t.render())})),i.push(t.after("*:change",function(n){n.target instanceof e.Model&&!t.get(I)&&t.render()})),t.get("partOfMultiView")||i.push(t.on("*:datepickerclick",function(){t.lockView(),t.once("*:"+fn,function(){t.unlockView()})})),t.get("partOfMultiView")||i.push(t.on(["*:"+tt,"*:"+et,"*:"+Y,"*:"+Q],function(i){var s=i.promise,o=i.target,u=i.type.split(":")[1],a=i.options,f=e.ITSAMessageController,l=o._itsamessageListener||f&&f._targets[T+"sync"],c=u===Q&&a&&(a.remove||a[_]),h;if(!c&&o instanceof e.Model){t._lockedBefore=t._locked,t.lockView(!0);if(u===tt||u===et)h=o.getAttrs(),o.UIToModel();l||t._setSpin(u,!0),u===Q||s.then(function(){(u===Y||u===tt||u===et)&&o.setResetAttrs()},function(){return(u===tt||u===et)&&o.setAttrs(h,{fromInternal:!0}),!0}).then(function(){l||t._setSpin(u,!1),t._lockedBefore||t.unlockView(),n.pluginReady(z,r).then(function(e){e.focusInitialItem()})})}})),i.push(t.after("*:destroy",function(n){n.target instanceof e.Model&&t.render(!0)})),i.push(t.after(q+g,function(e){t._contIsForm=e.newVal.get(y)===v})),i.push(n.after(nt,function(){n.addClass(E)})),i.push(n.after(rt,function(){n.removeClass(E)})),i.push(e.Intl.after("intl:lang"+g,function(){t._intl=e.Intl.get(b+w),t.render()})),i.push(t.after(S+g,function(e){n.toggleClass(w+"-"+S,e.newVal)})),i.push(t.after(W+g,function(e){t._setFocusManager(e.newVal)})),i.push(t.after(en+g,function(e){t._setButtonTransform(e.newVal)})),s.each([nt,ln,cn,fn],function(e){i.push(t.on("*:"+e,function(n){var r=!0,i=e,s,o;n.target!==t&&n.currentTarget===t&&(e===nt&&(o=n.type.split(":")[0],J[o]?i=o+e:r=!1),s={type:i,model:t.get(T),modelEventFacade:n,target:t,value:n.value,node:n.node,nodeid:n.nodeid,nodelist:n.nodelist,formElement:n.formElement},r&&(t.fire(i,s),i===hn&&n.value===ot&&(s.type=i=pn,t.fire(i,s))))}))})},s.each([N,C,k,L,A],function(t){n.prototype[T+t]=function(){var n=this,r=n.get(T);r instanceof e.Model&&!r.get(M)&&r[D+t]&&r[D+t]()}}),s.each([N,C,k,L],function(t){n.prototype[T+t+O]=function(){var n=this,r=n.get(T),i=t.toLowerCase();return r instanceof e.Model&&!r.get(M)&&r[i+O]||null}}),n.prototype._clearEventhandlers=function(){s.each(this._eventhandlers,function(e){e.detach()})},n.prototype._createButtons=function(){var e=this,t=e._customBtnLabels,n=e._hotkeys;e._buttons=[{propertykey:pt,type:x,config:{value:it,hotkey:n[pt]},labelHTML:function(){return t[pt]?i.sub(t[pt],{label:e._intl[it]}):e._intl[it]}},{propertykey:dt,type:x,config:{value:st,hotkey:n[dt]},labelHTML:function(){return t[dt]?i.sub(t[dt],{label:e._intl[st]}):e._intl[st]}},{propertykey:vt,type:x,config:{value:ot,hotkey:n[vt]},labelHTML:function(){return t[vt]?i.sub(t[vt],{label:e._intl[ot]}):e._intl[ot]}},{propertykey:mt,type:Q,config:{value:Q,hotkey:n[mt]},labelHTML:function(){return t[mt]?i.sub(t[mt],{label:e._intl[Q]}):e._intl[Q]}},{propertykey:gt,type:x,config:{value:ut,hotkey:n[gt]},labelHTML:function(){return t[gt]?i.sub(t[gt],{label:e._intl[ut]}):e._intl[ut]}},{propertykey:yt,type:Y,config:{value:Y,hotkey:n[yt]},labelHTML:function(){return t[yt]?i.sub(t[yt],{label:e._intl[Y]}):e._intl[Y]}},{propertykey:bt,type:x,config:{value:at,hotkey:n[bt]},labelHTML:function(){return t[bt]?
-i.sub(t[bt],{label:e._intl[at]}):e._intl[at]}},{propertykey:wt,type:x,config:{value:ft,hotkey:n[wt]},labelHTML:function(){return t[wt]?i.sub(t[wt],{label:e._intl[ft]}):e._intl[ft]}},{propertykey:Et,type:G,config:{value:G,hotkey:n[Et]},labelHTML:function(){return t[Et]?i.sub(t[Et],{label:e._intl[G]}):e._intl[G]}},{propertykey:St,type:Z,config:{value:Z,hotkey:n[St]},labelHTML:function(){return t[St]?i.sub(t[St],{label:e._intl[Z]}):e._intl[Z]}},{propertykey:xt,type:x,config:{value:lt,hotkey:n[xt]},labelHTML:function(){return t[xt]?i.sub(t[xt],{label:e._intl[lt]}):e._intl[lt]}},{propertykey:Tt,type:et,config:{value:et,hotkey:n[Tt]},labelHTML:function(){return t[Tt]?i.sub(t[Tt],{label:e._intl[et]}):e._intl[et]}},{propertykey:Nt,type:tt,config:{value:tt,hotkey:n[Nt]},labelHTML:function(){return t[Nt]?i.sub(t[Nt],{label:e._intl[tt]}):e._intl[tt]}},{propertykey:Ct,type:x,config:{value:ct,hotkey:n[Ct]},labelHTML:function(){return t[Ct]?i.sub(t[Ct],{label:e._intl[ct]}):e._intl[ct]}},{propertykey:Lt,type:x,config:{classname:h,value:it,hotkey:n[Lt]},labelHTML:function(){return t[Lt]?i.sub(t[Lt],{label:e._intl[it]}):i.sub(p,{type:it})+e._intl[it]}},{propertykey:At,type:x,config:{classname:h,value:st,hotkey:n[At]},labelHTML:function(){return t[At]?i.sub(t[At],{label:e._intl[st]}):i.sub(p,{type:st})+e._intl[st]}},{propertykey:Ot,type:x,config:{classname:h,value:ot,hotkey:n[Ot]},labelHTML:function(){return t[Ot]?i.sub(t[Ot],{label:e._intl[ot]}):i.sub(p,{type:st})+e._intl[ot]}},{propertykey:Mt,type:Q,config:{classname:h,value:Q,hotkey:n[Mt]},labelHTML:function(){return t[Mt]?i.sub(t[Mt],{label:e._intl[Q]}):i.sub(p,{type:Q})+e._intl[Q]}},{propertykey:_t,type:x,config:{classname:h,value:ut,hotkey:n[_t]},labelHTML:function(){return t[_t]?i.sub(t[_t],{label:e._intl[ut]}):i.sub(p,{type:ut})+e._intl[ut]}},{propertykey:Dt,type:Y,config:{classname:h,value:Y,hotkey:n[Dt]},labelHTML:function(){return t[Dt]?i.sub(t[Dt],{label:e._intl[Y]}):i.sub(p,{type:Y})+e._intl[Y]}},{propertykey:Pt,type:x,config:{classname:h,value:at,hotkey:n[Pt]},labelHTML:function(){return t[Pt]?i.sub(t[Pt],{label:e._intl[at]}):i.sub(p,{type:at})+e._intl[at]}},{propertykey:Ht,type:x,config:{classname:h,value:ft,hotkey:n[Ht]},labelHTML:function(){return t[Ht]?i.sub(t[Ht],{label:e._intl[ft]}):i.sub(p,{type:ft})+e._intl[ft]}},{propertykey:Bt,type:G,config:{classname:h,value:G,hotkey:n[Bt]},labelHTML:function(){return t[Bt]?i.sub(t[Bt],{label:e._intl[G]}):i.sub(p,{type:G})+e._intl[G]}},{propertykey:jt,type:Z,config:{classname:h,value:Z,hotkey:n[jt]},labelHTML:function(){return t[jt]?i.sub(t[jt],{label:e._intl[Z]}):i.sub(p,{type:Z})+e._intl[Z]}},{propertykey:Ft,type:x,config:{classname:h,value:lt,hotkey:n[Ft]},labelHTML:function(){return t[Ft]?i.sub(t[Ft],{label:e._intl[lt]}):i.sub(p,{type:lt})+e._intl[lt]}},{propertykey:It,type:et,config:{classname:h,value:et,hotkey:n[It]},labelHTML:function(){return t[It]?i.sub(t[It],{label:e._intl[et]}):i.sub(p,{type:et})+e._intl[et]}},{propertykey:qt,type:tt,config:{classname:h,value:tt,hotkey:n[qt]},labelHTML:function(){return t[qt]?i.sub(t[qt],{label:e._intl[tt]}):i.sub(p,{type:tt})+e._intl[tt]}},{propertykey:Rt,type:x,config:{classname:h,value:ct,hotkey:n[Rt]},labelHTML:function(){return t[Rt]?i.sub(t[Rt],{label:e._intl[ct]}):i.sub(p,{type:ct})+e._intl[ct]}},{propertykey:zt,type:Y,config:{spinbusy:!0,classname:h,value:Y,hotkey:n[zt]},labelHTML:function(){return t[zt]?i.sub(t[zt],{label:e._intl[Y]}):i.sub(p,{type:Y})+e._intl[Y]}},{propertykey:Wt,type:G,config:{spinbusy:!0,classname:h,value:G,hotkey:n[Wt]},labelHTML:function(){return t[Wt]?i.sub(t[Wt],{label:e._intl[G]}):i.sub(p,{type:G})+e._intl[G]}},{propertykey:Xt,type:et,config:{spinbusy:!0,classname:h,value:et,hotkey:n[Xt]},labelHTML:function(){return t[Xt]?i.sub(t[Xt],{label:e._intl[et]}):i.sub(p,{type:et})+e._intl[et]}},{propertykey:Vt,type:tt,config:{spinbusy:!0,classname:h,value:tt,hotkey:n[Vt]},labelHTML:function(){return t[Vt]?i.sub(t[Vt],{label:e._intl[tt]}):i.sub(p,{type:tt})+e._intl[tt]}}]},n.prototype[D+fn]=function(){var e=this,t=e.get(q);t.hasClass(E)&&t.pluginReady(z,r).then(function(e){e.next()},function(){})},n.prototype[U+ln]=function(e){e.modelEventFacade.preventDefault()},n.prototype[D+ln]=function(t){var n=t.nodelist&&t.nodelist.item(0);n&&(n.getDOMNode()===e.config.doc.activeElement?e.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget:n}):n.focus(),n.scrollIntoView())},n.prototype._setButtonTransform=function(e){var t=this.get(q);t.toggleClass(Gt,e===$t),t.toggleClass(Yt,e===Jt),t.toggleClass(Zt,e===Kt)},n.prototype._setFocusManager=function(t){var n=this,r=n.get(q),i=r.itsatabkeymanager;t?e.use(b+z,function(){n.get(M)||(i?i.refresh(r):(r.plug(e.Plugin.ITSATabKeyManager),i=r.itsatabkeymanager,n.addTarget(i)),r.hasClass(E)&&r.itsatabkeymanager.focusInitialItem())}):i&&n.removeTarget(i)&&r.unplug(z)},n.prototype._setModel=function(t){var n=this;return typeof t===F?(n._textTemplate=t,t={}):n._textTemplate=null,!n._formcss_loaded&&t&&t.toJSONUI&&(n._formcss_loaded=!0,e.use("gallerycss-itsa-form")),t},n.prototype._setSpin=function(e,t){var n=this,r=n.get(q).all('[data-buttonsubtype="'+e+'"] i');r.toggleClass("itsaicon-form-loading",t),r.toggleClass("itsa-busy",t)},n.prototype._setTemplateRenderer=function(){var e=this,t=e.get(m),n=e.get(I),r,u,a,f;r=function(){var e=/<%(.+)%>/;return e.test(t)},f=function(n,r){var i,u,a,f,l;s.each(e._buttons,function(e){i=e.propertykey,l=new RegExp("{"+i+"}"),l.test(t)&&(u=e.type,a=e.labelHTML(),f=e.config,n[i]=r._renderBtnFns[u]&&r._renderBtnFns[u].call(r,a,f))}),o.each(e._customBtns,function(e,i){l=new RegExp("{"+i+"}"),l.test(t)&&(a=e.labelHTML,f=e.config,n[i]=r._renderBtnFns[x]&&r._renderBtnFns[x].call(r,a,f))})},u=e._isMicroTemplate=r(),u?(a=d.compile(t),e._modelRenderer=function(r){var i=n?r.toJSONUI(null,t):e.toJSON();return r.toJSONUI&&f(i,r),a(i)}):e._modelRenderer=function(r){var s=n?r.toJSONUI(null,t):e.toJSON();return r.toJSONUI&&f(s,r),i.sub(t,s)},e._viewNeedsForm=!e._contIsForm&&!/<form([^>]*)>/
-.test(t)}},"@VERSION@",{requires:["yui-base","gallery-itsapluginpromise","intl","base-base","base-build","view","widget-base","template-base","template-micro","model","node-style","event-custom","event-outside","event-custom-base","oop","promise","pluginhost-base","gallery-itsamodulesloadedpromise","gallerycss-itsa-base"],lang:["ar","bg","bs","cs","da","de","en","es","fa","fi","fr","he","hi","hr","hu","it","ja","nb","nl","pl","pt","ru","sk","sr","sv","uk","zh"],skinnable:!0});
+YUI.add("gallery-itsaviewmodel",function(e,t){"use strict";function wn(){}var n,r=4e3,i=e.Lang,s=e.Array,o=e.Object,u=e.Intl,a="itsa",f=a+"-",l="pure-form",c=l+" "+l+"-aligned",h=a+"button-iconleft",p='<i class="itsaicon-form-{type}"></i>',d=e.Template.Micro,v="FORM",m="template",g="Change",y="tagName",b="gallery-",w=a+"viewmodel",E=f+"focused",S="styled",x="button",T="model",N="Save",C="Submit",k="Load",L="Destroy",A="Reset",O="Promise",M="destroyed",_="delete",D="_defFn_",P="status",H=P+"bar",B=P+"Bar",j="boolean",F="string",I="editable",q="container",R="viewrendered",U="_defPrevFn_",z=a+"tabkeymanager",W="focusManaged",X="disabled",V="data-itsa"+H,$="pure-"+x+"-"+X,J={button:!0,destroy:!0,remove:!0,reset:!0,save:!0,submit:!0,load:!0},K={btn_abort:!0,btn_cancel:!0,btn_close:!0,btn_destroy:!0,btn_ignore:!0,btn_load:!0,btn_no:!0,btn_ok:!0,btn_remove:!0,btn_reset:!0,btn_retry:!0,btn_save:!0,btn_submit:!0,btn_yes:!0,imgbtn_abort:!0,imgbtn_cancel:!0,imgbtn_close:!0,imgbtn_destroy:!0,imgbtn_ignore:!0,imgbtn_load:!0,imgbtn_no:!0,imgbtn_ok:!0,imgbtn_remove:!0,imgbtn_reset:!0,imgbtn_retry:!0,imgbtn_save:!0,imgbtn_submit:!0,imgbtn_yes:!0,spinbtn_load:!0,spinbtn_remove:!0,spinbtn_save:!0,spinbtn_submit:!0},Q="destroy",G="remove",Y="load",Z="reset",et="save",tt="submit",nt="click",rt=nt+"outside",it="abort",st="cancel",ot="close",ut="ignore",at="no",ft="ok",lt="retry",ct="yes",ht="btn_",pt=ht+it,dt=ht+st,vt=ht+ot,mt=ht+Q,gt=ht+ut,yt=ht+Y,bt=ht+at,wt=ht+ft,Et=ht+G,St=ht+Z,xt=ht+lt,Tt=ht+et,Nt=ht+tt,Ct=ht+ct,kt="img",Lt=kt+pt,At=kt+dt,Ot=kt+vt,Mt=kt+mt,_t=kt+gt,Dt=kt+yt,Pt=kt+bt,Ht=kt+wt,Bt=kt+Et,jt=kt+St,Ft=kt+xt,It=kt+Tt,qt=kt+Nt,Rt=kt+Ct,Ut="spin",zt=Ut+yt,Wt=Ut+Et,Xt=Ut+Tt,Vt=Ut+Nt,$t="uppercase",Jt="lowercase",Kt="capitalize",Qt=f+x+"-",Gt=Qt+$t,Yt=Qt+Jt,Zt=Qt+Kt,en=x+"Transform",tn=b+a+H,nn=b+a+T+"syncpromise",rn="itsaview-",sn=rn+H,on="</div>",un='<div class="'+sn+'">'+on,an='<div class="'+rn+'wrapper">',fn="focusnext",ln="validationerror",cn="uichanged",hn=x+nt,pn=x+ot,dn=Q+nt,vn=G+nt,mn=Y+nt,gn=tt+nt,yn=Z+nt,bn=et+nt;e.mix(wn.prototype,{cleanupWidgets:function(t){var n=this,r=e.Widget;r&&n.all(".yui3-widget").each(function(e){if(n.one("#"+e.get("id"))){var i=r.getByNode(e);i&&i.destroy(t)}})},cleanup:function(e){var t=this;e&&t.cleanupWidgets(!0),t.get("childNodes").destroy(!0)}},!0),e.Node.ITSANodeCleanup=wn,e.Base.mix(e.Node,[wn]),n=e.ITSAViewModel=e.Base.create(w,e.View,[],{},{ATTRS:{buttonTransform:{value:null,validator:function(e){return e===null||e===$t||e===Jt||e===Kt}},editable:{value:!1,validator:function(e){return typeof e===j},getter:function(e){var t=this.get(T);return e&&t&&t.toJSONUI}},focusManaged:{value:!0,validator:function(e){return typeof e===j}},model:{value:{},validator:function(t){return t===null||i.isObject(t)||typeof t===F||t instanceof e.Model},setter:"_setModel"},partOfMultiView:{value:!1,initOnly:!0,validator:function(e){return typeof e===j}},statusBar:{value:!1,validator:function(e){return typeof e===j}},styled:{value:!0,validator:function(e){return typeof e===j}},template:{value:null,validator:function(e){return typeof e===F},getter:function(e){var t=this;return t._textTemplate||(e===null?t.warnNoTemplate?t._intl.undefined_template:"":e)}}}}),n.prototype._formcss_loaded=!1,n.prototype.initializer=function(){var t=this,n=t.get(T),r;r=t._renderPromise=new e.Promise(function(e){t._renderPromiseResolve=e}),t._intl=u.get(b+w),t.warnNoTemplate=!0,s.each([dn,vn,yn,bn,gn,hn,mn,cn],function(n){t[U+n]=function(e){e.modelEventFacade.preventDefault()},t.publish(n,{preventedFn:e.bind(t[U+n],t),emitFacade:!0})}),t.publish(fn,{defaultFn:e.bind(t[D+fn],t),emitFacade:!0}),t.publish(ln,{defaultFn:e.bind(t[D+ln],t),preventedFn:e.bind(t[U+ln],t),emitFacade:!0}),t._eventhandlers=[],t._contIsForm=t.get(q).get(y)===v,n&&n.addTarget&&n.addTarget(t),n&&t.get(m)&&t._setTemplateRenderer(),t._customBtns={},t._hotkeys={},t._customBtnLabels={},t._createButtons()},n.prototype.addCustomBtn=function(e,t,n){var r=this;K[e]||(r._customBtns[e]={config:n,labelHTML:t||e})},n.prototype.addCustomBtns=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonId&&e.labelHTML&&t.addCustomBtn(e.buttonId,e.labelHTML,e.config)})},n.prototype.addMessageTarget=function(e){var t=this.get(T);t&&t.addMessageTarget&&t.addMessageTarget(e)},n.prototype.blur=function(){this.get(q).removeClass(E)},n.prototype.focus=function(){var e=this,t=e.get(q);e.isRendered().then(function(){t.addClass(E),t.pluginReady(z,r).then(function(e){e._retrieveFocus()})})},n.prototype.focusInitialItem=function(){var e=this,t=e.get(q);return t.pluginReady(z,r).then(function(e){t.addClass(E),e.focusInitialItem()})},n.prototype.isRendered=function(){return this._renderPromise},n.prototype.lockView=function(){var e=this,t=e.get(T),n=arguments[0],r=e.get(I)&&t&&t.toJSONUI;r?t.disableUI():e.get(q).all("button").addClass($),n||(e._locked=!0)},n.prototype.removeButtonLabel=function(e){var t=this;e?delete t._customBtnLabels[e]:t._customBtnLabels={}},n.prototype.removeCustomBtn=function(e){var t=this;delete this._customBtns[e],e?delete t._customBtns[e]:t._customBtns={}},n.prototype.removeHotKey=function(e){var t=this;e?delete t._hotkeys[e]:t._hotkeys={},t._createButtons()},n.prototype.removeMessageTarget=function(){var e=this.get(T);e&&e.removeMessageTarget&&e.removeMessageTarget()},n.prototype.removePrimaryButton=function(){var e=this,t=e._buttons;s.each(t,function(e){e.config.primary=!1})},n.prototype.render=function(t,n){var r=this,i=r.get(q),s=r.get(T),o=r.get(I),u=r.get(B),a=r._itsastatusbar,f=e.Global.ItsaDateTimePicker,l=t||!s?"":r._modelRenderer(s),h;return o||r._isMicroTemplate?(o&&(r._initialEditAttrs=s.getAttrs()),i.cleanup(r._rendered)):(!n||!r.get("partOfMultiView"))&&i.cleanup(!1),r._rendered||(i.inDoc()||(r._newContainer=!0)&&e.one("body").append(i),i.addClass(w),i.toggleClass(w+"-"+S,r.get(S)),r._setButtonTransform(r.get(en)),r._bindUI()),r._rendered=!0,l.length>0&&o&&r._viewNeedsForm&&(l=(u?an:"")+'<form class="'+c+'">'+l+"</form>"+
+(u?on:"")),u&&(a||(l+=un)),i.setHTML(l),u?(i.setAttribute(V,"true"),a?i.append(a.get("parentNode")):e.usePromise(tn).then(function(){var t=i.one("."+sn);a=r._itsastatusbar=new e.ITSAStatusbar({parentNode:t}),r._viewName=a._viewName,s&&e.batch(e.usePromise(nn),a.isReady()).then(function(){s.addMessageTarget(r._itsastatusbar)}),r._repositionStatusbar()})):(i.removeAttribute(V),r._viewName=null),h=o&&r.get(W),r._setFocusManager(h),h?e.usePromise(b+z).then(function(){r._renderPromiseResolve(),r.fire(R,{target:r})}):(r._renderPromiseResolve(),r.fire(R,{target:r})),f&&f.panel.get("visible")&&f.hide(!0),r},n.prototype.setButtonLabel=function(e,t){var n=this;K[e]&&typeof t===F&&t.length>0&&(n._customBtnLabels[e]=t)},n.prototype.setButtonLabels=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonType&&e.labelHTML&&t.setButtonLabel(e.buttonType,e.labelHTML)})},n.prototype.setHotKey=function(e,t){var n=this;K[e]&&(typeof t===F||i.isObject(t))&&(n._hotkeys[e]=t)&&n._createButtons()},n.prototype.setHotKeys=function(e){var t=this;i.isArray(e)&&s.each(e,function(e){e.buttonType&&e.hotkey&&t.setHotKey(e.buttonType,e.hotkey)})},n.prototype.setPrimaryButton=function(e){var t=this,n=t._buttons;K[e]&&s.each(n,function(t){t.config.primary=t.propertykey===e})},n.prototype.toJSON=function(){var t=this.get(T);return t instanceof e.Model?t.toJSON():t},n.prototype.translate=function(e){return this._intl[e]||e},n.translatePromise=function(t){return e.usePromise("intl").then(function(){var e=u.get(b+w);return e[t]||t},function(){return t})},n.prototype.translatePromise=n.translatePromise,n.prototype.unlockView=function(){var e=this,t=e.get(T),n=e.get(I)&&t&&t.toJSONUI;n?t.enableUI():e.get(q).all("button").removeClass($),e._locked=!1},n.prototype.destructor=function(){var e=this,t=e.get(T),n=e._itsastatusbar,r=e.get(q);t&&t.removeTarget&&t.removeTarget(e),e._itsastatusbar=null,n&&(t&&t.removeMessageTarget(n),n.destroy()),e._clearEventhandlers(),e._customBtns={},e._customBtnLabels={},e._hotkeys={},r.empty(),e._newContainer?r.remove(!0):(r.removeClass(w+"-"+S),r.destroy(!0))},n.prototype._bindUI=function(){var t=this,n=t.get(q),i=t._eventhandlers;i.push(t.after(T+g,function(n){var r=n.prevVal,i=n.newVal,s=r&&r.toJSONUI,o=i&&i.toJSONUI,u=t.get(B);r&&(r.removeTarget&&r.removeTarget(t),u&&r.removeMessageTarget(t._itsastatusbar)),i&&(i.addTarget&&i.addTarget(t),u&&e.usePromise(nn).then(function(){i.addMessageTarget(t._itsastatusbar)})),s!==o&&o&&t.get(m)&&t._setTemplateRenderer(),t.render()})),i.push(t.after(m+g,function(){t.get(T)&&(t._setTemplateRenderer(),t.render())})),i.push(t.after(B+g,e.bind(t.render,t))),i.push(t.after("*:"+Z,function(){t._isMicroTemplate?t.render():n.pluginReady(z,r).then(function(e){e.focusInitialItem()})})),i.push(t.after(I+g,function(){var e=t.get(T);t.get(m)&&e&&e.toJSONUI&&(t._setTemplateRenderer(),t.render())})),i.push(t.after("*:change",function(n){n.target instanceof e.Model&&t.render(!1,!0)})),t.get("partOfMultiView")||i.push(t.on("*:datepickerclick",function(){t.lockView(),t.once("*:"+fn,function(){t.unlockView()})})),t.get("partOfMultiView")||i.push(t.on("*:"+Z,e.bind(t._disableSaveBtns,t))),t.get("partOfMultiView")||i.push(t.on(["*:"+tt,"*:"+et,"*:"+Y,"*:"+Q],function(i){var s=i.promise,o=i.target,u=i.type.split(":")[1],a=i.options,f=e.ITSAMessageController,l=o._itsamessageListener||f&&f._targets[T+"sync"],c=u===Q&&a&&(a.remove||a[_]),h;if(!c&&o instanceof e.Model){if(u===tt||u===et)h=o.getAttrs(),t.get(I)&&o.UIToModel();u!==et||o.isModified()?(t._lockedBefore=t._locked,t.lockView(!0),l||t._setSpin(u,!0),u===Q||s.then(function(){(u===Y||u===tt||u===et)&&o.setResetAttrs()},function(){return(u===tt||u===et)&&o.setAttrs(h,{fromInternal:!0}),!0}).then(function(){l||t._setSpin(u,!1),t._lockedBefore||t.unlockView(),u===tt||t._disableSaveBtns(),n.pluginReady(z,r).then(function(e){e.focusInitialItem()})})):u===et&&t._disableSaveBtns()}})),i.push(t.on("*:nodeChange",function(e){t._enableSaveBtns()})),i.push(t.after("*:destroy",function(n){n.target instanceof e.Model&&t.render(!0)})),i.push(t.after(q+g,function(e){t._contIsForm=e.newVal.get(y)===v})),i.push(n.after(nt,function(){n.addClass(E)})),i.push(n.after(rt,function(){n.removeClass(E)})),i.push(e.Intl.after("intl:lang"+g,function(){t._intl=e.Intl.get(b+w),t.render()})),i.push(t.after(S+g,function(e){n.toggleClass(w+"-"+S,e.newVal)})),i.push(t.after(W+g,function(e){t._setFocusManager(e.newVal)})),i.push(t.after(en+g,function(e){t._setButtonTransform(e.newVal)})),i.push(t.after(cn,e.bind(t._enableSaveBtns,t))),s.each([nt,ln,cn,fn],function(e){i.push(t.on("*:"+e,function(n){var r=!0,i=e,s,o;n.target!==t&&n.currentTarget===t&&(e===nt&&(o=n.type.split(":")[0],J[o]?i=o+e:r=!1),s={type:i,model:t.get(T),modelEventFacade:n,target:t,value:n.value,node:n.node,nodeid:n.nodeid,nodelist:n.nodelist,formElement:n.formElement},r&&(t.fire(i,s),i===hn&&n.value===ot&&(s.type=i=pn,t.fire(i,s))))}))})},s.each([N,C,k,L,A],function(t){n.prototype[T+t]=function(){var n=this,r=n.get(T);r instanceof e.Model&&!r.get(M)&&r[D+t]&&r[D+t]()}}),s.each([N,C,k,L],function(t){n.prototype[T+t+O]=function(){var n=this,r=n.get(T),i=t.toLowerCase();return r instanceof e.Model&&!r.get(M)&&r[i+O]||null}}),n.prototype._clearEventhandlers=function(){s.each(this._eventhandlers,function(e){e.detach()})},n.prototype._createButtons=function(){var e=this,t=e._customBtnLabels,n=e._hotkeys;e._buttons=[{propertykey:pt,type:x,config:{value:it,hotkey:n[pt]},labelHTML:function(){return t[pt]?i.sub(t[pt],{label:e._intl[it]}):e._intl[it]}},{propertykey:dt,type:x,config:{value:st,hotkey:n[dt]},labelHTML:function(){return t[dt]?i.sub(t[dt],{label:e._intl[st]}):e._intl[st]}},{propertykey:vt,type:x,config:{value:ot,hotkey:n[vt]},labelHTML:function(){return t[vt]?i.sub(t[vt],{label:e._intl[ot]}):e._intl[ot]}},{propertykey:mt,type:Q,config:{value:Q,hotkey:n[mt]},labelHTML:function(){return t[mt]?i.sub(t[mt],{label:e._intl[Q]}):e._intl[Q]}},{propertykey:gt,type:x,config:{value:ut,hotkey:n
+[gt]},labelHTML:function(){return t[gt]?i.sub(t[gt],{label:e._intl[ut]}):e._intl[ut]}},{propertykey:yt,type:Y,config:{value:Y,hotkey:n[yt]},labelHTML:function(){return t[yt]?i.sub(t[yt],{label:e._intl[Y]}):e._intl[Y]}},{propertykey:bt,type:x,config:{value:at,hotkey:n[bt]},labelHTML:function(){return t[bt]?i.sub(t[bt],{label:e._intl[at]}):e._intl[at]}},{propertykey:wt,type:x,config:{value:ft,hotkey:n[wt]},labelHTML:function(){return t[wt]?i.sub(t[wt],{label:e._intl[ft]}):e._intl[ft]}},{propertykey:Et,type:G,config:{value:G,hotkey:n[Et]},labelHTML:function(){return t[Et]?i.sub(t[Et],{label:e._intl[G]}):e._intl[G]}},{propertykey:St,type:Z,config:{value:Z,hotkey:n[St]},labelHTML:function(){return t[St]?i.sub(t[St],{label:e._intl[Z]}):e._intl[Z]}},{propertykey:xt,type:x,config:{value:lt,hotkey:n[xt]},labelHTML:function(){return t[xt]?i.sub(t[xt],{label:e._intl[lt]}):e._intl[lt]}},{propertykey:Tt,type:et,config:{classname:$,value:et,hotkey:n[Tt]},labelHTML:function(){return t[Tt]?i.sub(t[Tt],{label:e._intl[et]}):e._intl[et]}},{propertykey:Nt,type:tt,config:{value:tt,hotkey:n[Nt]},labelHTML:function(){return t[Nt]?i.sub(t[Nt],{label:e._intl[tt]}):e._intl[tt]}},{propertykey:Ct,type:x,config:{value:ct,hotkey:n[Ct]},labelHTML:function(){return t[Ct]?i.sub(t[Ct],{label:e._intl[ct]}):e._intl[ct]}},{propertykey:Lt,type:x,config:{classname:h,value:it,hotkey:n[Lt]},labelHTML:function(){return t[Lt]?i.sub(t[Lt],{label:e._intl[it]}):i.sub(p,{type:it})+e._intl[it]}},{propertykey:At,type:x,config:{classname:h,value:st,hotkey:n[At]},labelHTML:function(){return t[At]?i.sub(t[At],{label:e._intl[st]}):i.sub(p,{type:st})+e._intl[st]}},{propertykey:Ot,type:x,config:{classname:h,value:ot,hotkey:n[Ot]},labelHTML:function(){return t[Ot]?i.sub(t[Ot],{label:e._intl[ot]}):i.sub(p,{type:st})+e._intl[ot]}},{propertykey:Mt,type:Q,config:{classname:h,value:Q,hotkey:n[Mt]},labelHTML:function(){return t[Mt]?i.sub(t[Mt],{label:e._intl[Q]}):i.sub(p,{type:Q})+e._intl[Q]}},{propertykey:_t,type:x,config:{classname:h,value:ut,hotkey:n[_t]},labelHTML:function(){return t[_t]?i.sub(t[_t],{label:e._intl[ut]}):i.sub(p,{type:ut})+e._intl[ut]}},{propertykey:Dt,type:Y,config:{classname:h,value:Y,hotkey:n[Dt]},labelHTML:function(){return t[Dt]?i.sub(t[Dt],{label:e._intl[Y]}):i.sub(p,{type:Y})+e._intl[Y]}},{propertykey:Pt,type:x,config:{classname:h,value:at,hotkey:n[Pt]},labelHTML:function(){return t[Pt]?i.sub(t[Pt],{label:e._intl[at]}):i.sub(p,{type:at})+e._intl[at]}},{propertykey:Ht,type:x,config:{classname:h,value:ft,hotkey:n[Ht]},labelHTML:function(){return t[Ht]?i.sub(t[Ht],{label:e._intl[ft]}):i.sub(p,{type:ft})+e._intl[ft]}},{propertykey:Bt,type:G,config:{classname:h,value:G,hotkey:n[Bt]},labelHTML:function(){return t[Bt]?i.sub(t[Bt],{label:e._intl[G]}):i.sub(p,{type:G})+e._intl[G]}},{propertykey:jt,type:Z,config:{classname:h,value:Z,hotkey:n[jt]},labelHTML:function(){return t[jt]?i.sub(t[jt],{label:e._intl[Z]}):i.sub(p,{type:Z})+e._intl[Z]}},{propertykey:Ft,type:x,config:{classname:h,value:lt,hotkey:n[Ft]},labelHTML:function(){return t[Ft]?i.sub(t[Ft],{label:e._intl[lt]}):i.sub(p,{type:lt})+e._intl[lt]}},{propertykey:It,type:et,config:{classname:$+" "+h,value:et,hotkey:n[It]},labelHTML:function(){return t[It]?i.sub(t[It],{label:e._intl[et]}):i.sub(p,{type:et})+e._intl[et]}},{propertykey:qt,type:tt,config:{classname:h,value:tt,hotkey:n[qt]},labelHTML:function(){return t[qt]?i.sub(t[qt],{label:e._intl[tt]}):i.sub(p,{type:tt})+e._intl[tt]}},{propertykey:Rt,type:x,config:{classname:h,value:ct,hotkey:n[Rt]},labelHTML:function(){return t[Rt]?i.sub(t[Rt],{label:e._intl[ct]}):i.sub(p,{type:ct})+e._intl[ct]}},{propertykey:zt,type:Y,config:{spinbusy:!0,classname:h,value:Y,hotkey:n[zt]},labelHTML:function(){return t[zt]?i.sub(t[zt],{label:e._intl[Y]}):i.sub(p,{type:Y})+e._intl[Y]}},{propertykey:Wt,type:G,config:{spinbusy:!0,classname:h,value:G,hotkey:n[Wt]},labelHTML:function(){return t[Wt]?i.sub(t[Wt],{label:e._intl[G]}):i.sub(p,{type:G})+e._intl[G]}},{propertykey:Xt,type:et,config:{spinbusy:!0,classname:$+" "+h,value:et,hotkey:n[Xt]},labelHTML:function(){return t[Xt]?i.sub(t[Xt],{label:e._intl[et]}):i.sub(p,{type:et})+e._intl[et]}},{propertykey:Vt,type:tt,config:{spinbusy:!0,classname:h,value:tt,hotkey:n[Vt]},labelHTML:function(){return t[Vt]?i.sub(t[Vt],{label:e._intl[tt]}):i.sub(p,{type:tt})+e._intl[tt]}}]},n.prototype[D+fn]=function(){var e=this,t=e.get(q);t.hasClass(E)&&t.pluginReady(z,r).then(function(e){e.next()},function(){})},n.prototype[U+ln]=function(e){e.modelEventFacade.preventDefault()},n.prototype[D+ln]=function(t){var n=t.nodelist&&t.nodelist.item(0);n&&(n.getDOMNode()===e.config.doc.activeElement?e.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget:n}):n.focus(),n.scrollIntoView())},n.prototype._disableSaveBtns=function(){var e=this,t=e.get(q).all('button[data-buttonsubtype="save"]');t.addClass($)},n.prototype._enableSaveBtns=function(){var e=this,t=e.get(q).all('button[data-buttonsubtype="save"]');t.removeClass($)},n.prototype._setButtonTransform=function(e){var t=this.get(q);t.toggleClass(Gt,e===$t),t.toggleClass(Yt,e===Jt),t.toggleClass(Zt,e===Kt)},n.prototype._setFocusManager=function(t){var n=this,r=n.get(q),i=r.itsatabkeymanager;t?e.use(b+z,function(){n.get(M)||(i?i.refresh(r):(r.plug(e.Plugin.ITSATabKeyManager),i=r.itsatabkeymanager,n.addTarget(i)),r.hasClass(E)&&r.itsatabkeymanager.focusInitialItem())}):i&&n.removeTarget(i)&&r.unplug(z)},n.prototype._setModel=function(t){var n=this;return typeof t===F?(n._textTemplate=t,t={}):n._textTemplate=null,!n._formcss_loaded&&t&&t.toJSONUI&&(n._formcss_loaded=!0,e.use("gallerycss-itsa-form")),t},n.prototype._setSpin=function(e,t){var n=this,r=n.get(q).all('[data-buttonsubtype="'+e+'"] i');r.toggleClass("itsaicon-form-loading",t),r.toggleClass("itsa-busy",t)},n.prototype._setTemplateRenderer=function(){var e=this,t=e.get(m),n=e.get(I),r,u,a,f;r=function(){var e=/<%(.+)%>/;return e.test(t)},f=function(n,r,i){var u,a,f,l,c;s.each(e._buttons,function(e){u=e.propertykey
+,c=i?new RegExp("<%==? (data|this)."+u+" %>"):new RegExp("{"+u+"}"),c.test(t)&&(a=e.type,f=e.labelHTML(),l=e.config,n[u]=r._renderBtnFns[a]&&r._renderBtnFns[a].call(r,f,l))}),o.each(e._customBtns,function(e,s){c=i?new RegExp("<%==? (data|this)."+s+" %>"):new RegExp("{"+s+"}"),c.test(t)&&(f=e.labelHTML,l=e.config,n[s]=r._renderBtnFns[x]&&r._renderBtnFns[x].call(r,f,l))})},u=e._isMicroTemplate=r(),u?(a=d.compile(t),e._modelRenderer=function(r){var i=n?r.toJSONUI(null,t):e.toJSON();return r.toJSONUI&&f(i,r,!0),a(i)}):e._modelRenderer=function(r){var s=n?r.toJSONUI(null,t):e.toJSON();return r.toJSONUI&&f(s,r,!1),i.sub(t,s)},e._viewNeedsForm=!e._contIsForm&&!/<form([^>]*)>/.test(t)}},"gallery-2014.01.03-22-50",{requires:["yui-base","gallery-itsapluginpromise","intl","base-base","base-build","view","widget-base","template-base","template-micro","model","node-style","event-custom","event-outside","event-custom-base","oop","promise","json","pluginhost-base","gallery-itsamodulesloadedpromise","gallerycss-itsa-base"],lang:["ar","bg","bs","cs","da","de","en","es","fa","fi","fr","he","hi","hr","hu","it","ja","nb","nl","pl","pt","ru","sk","sr","sv","uk","zh"],skinnable:!0});
View
159 build/gallery-itsaviewmodel/gallery-itsaviewmodel.js
@@ -1110,7 +1110,7 @@ ITSAViewModel.prototype.removePrimaryButton = function() {
* @since 0.3
*
*/
-ITSAViewModel.prototype.render = function (clear) {
+ITSAViewModel.prototype.render = function (clear, modelchange) {
var instance = this,
container = instance.get(CONTAINER),
model = instance.get(MODEL),
@@ -1120,6 +1120,21 @@ ITSAViewModel.prototype.render = function (clear) {
itsaDateTimePicker = Y.Global.ItsaDateTimePicker,
html = (clear || !model) ? '' : instance._modelRenderer(model),
withfocusmanager;
+/*jshint expr:true */
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+
+ // WELL: it seems we cannot call cleanup in no cases at all --> after *:change the view will be rerendered and
+ // this seems to lead into buttons not listening to click (empty model-internals)
+ // THUS: commented next line:
+
+// modelchange && !instance.get('partOfMultiView') && model && model.toJSONUI && model.cleanup();
+
+
+
+/*jshint expr:false */
// Render this view's HTML into the container element.
// Because Y.Node.setHTML DOES NOT destroy its nodes (!) but only remove(), we destroy them ourselves first
if (editMode || instance._isMicroTemplate) {
@@ -1129,7 +1144,13 @@ ITSAViewModel.prototype.render = function (clear) {
container.cleanup(instance._rendered);
}
else {
- container.cleanup(false);
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+ if (!modelchange || !instance.get('partOfMultiView')) {
+ container.cleanup(false);
+ }
}
// Append the container element to the DOM if it's not on the page already.
if (!instance._rendered) {
@@ -1558,6 +1579,7 @@ ITSAViewModel.prototype._bindUI = function() {
var instance = this,
container = instance.get(CONTAINER),
eventhandlers = instance._eventhandlers;
+
eventhandlers.push(
instance.after(
MODEL+CHANGE,
@@ -1582,7 +1604,6 @@ ITSAViewModel.prototype._bindUI = function() {
);
}
}
-
(prevFormModel !== newFormModel) && newFormModel && instance.get(TEMPLATE) && instance._setTemplateRenderer();
/*jshint expr:false */
instance.render();
@@ -1608,7 +1629,7 @@ ITSAViewModel.prototype._bindUI = function() {
);
eventhandlers.push(
instance.after(
- RESET,
+ '*:'+RESET,
function() {
if (instance._isMicroTemplate) {
// need to re-render because the code might have made items visible/invisible based on their value
@@ -1641,8 +1662,8 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
'*:change',
function(e) {
- if ((e.target instanceof Y.Model) && !instance.get(EDITABLE)) {
- instance.render();
+ if (e.target instanceof Y.Model) {
+ instance.render(false, true);
}
}
)
@@ -1663,6 +1684,13 @@ ITSAViewModel.prototype._bindUI = function() {
instance.get('partOfMultiView') || eventhandlers.push(
instance.on(
+ '*:'+RESET,
+ Y.bind(instance._disableSaveBtns, instance)
+ )
+ );
+
+ instance.get('partOfMultiView') || eventhandlers.push(
+ instance.on(
['*:'+SUBMIT, '*:'+SAVE, '*:'+LOAD, '*:'+DESTROY],
function(e) {
var promise = e.promise,
@@ -1674,39 +1702,53 @@ ITSAViewModel.prototype._bindUI = function() {
destroyWithoutRemove = ((eventType===DESTROY) && options && (options.remove || options[DELETE])),
prevAttrs;
if (!destroyWithoutRemove && (model instanceof Y.Model)) {
- instance._lockedBefore = instance._locked;
- instance.lockView(true);
if ((eventType===SUBMIT) || (eventType===SAVE)) {
prevAttrs = model.getAttrs();
- model.UIToModel();
+ instance.get(EDITABLE) && model.UIToModel();
+ }
+ if ((eventType!==SAVE) || (model.isModified())) {
+ instance._lockedBefore = instance._locked;
+ instance.lockView(true);
+ statusbar || instance._setSpin(eventType, true);
+ (eventType===DESTROY) || promise.then(
+ function() {
+ ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
+ },
+ function() {
+ ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
+ return true; // make promise fulfilled
+ }
+ ).then(
+ function() {
+ statusbar || instance._setSpin(eventType, false);
+ instance._lockedBefore || instance.unlockView();
+ (eventType===SUBMIT) || instance._disableSaveBtns();
+ container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
+ function(itsatabkeymanager) {
+ itsatabkeymanager.focusInitialItem();
+ }
+ );
+ }
+ );
+ }
+ else {
+ (eventType===SAVE) && instance._disableSaveBtns();
}
- statusbar || instance._setSpin(eventType, true);
- (eventType===DESTROY) || promise.then(
- function() {
- ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
- },
- function() {
- ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
- return true; // make promise fulfilled
- }
- ).then(
- function() {
- statusbar || instance._setSpin(eventType, false);
- instance._lockedBefore || instance.unlockView();
- container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
- function(itsatabkeymanager) {
- itsatabkeymanager.focusInitialItem();
- }
- );
- }
- );
}
}
)
);
/*jshint expr:false */
eventhandlers.push(
+ instance.on(
+ '*:nodeChange', // cones from EditorBase
+ function(e) {
+ instance._enableSaveBtns();
+ }
+ )
+ );
+ eventhandlers.push(
instance.after(
'*:destroy',
function(e) {
@@ -1774,6 +1816,14 @@ ITSAViewModel.prototype._bindUI = function() {
}
)
);
+
+ eventhandlers.push(
+ instance.after(
+ UI_CHANGED,
+ Y.bind(instance._enableSaveBtns, instance)
+ )
+ );
+
YArray.each(
[CLICK, VALIDATION_ERROR, UI_CHANGED, FOCUS_NEXT],
function(event) {
@@ -2069,7 +2119,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: BTN_SAVE,
type: SAVE,
- config: {value: SAVE, hotkey: hotkeys[BTN_SAVE]},
+ config: {classname: PURE_BUTTON_DISABLED, value: SAVE, hotkey: hotkeys[BTN_SAVE]},
labelHTML: function() { return customBtnLabels[BTN_SAVE] ? Lang.sub(customBtnLabels[BTN_SAVE], {label: instance._intl[SAVE]}) : instance._intl[SAVE]; }
},
{
@@ -2153,7 +2203,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: IMGBTN_SAVE,
type: SAVE,
- config: {classname: BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[IMGBTN_SAVE]},
+ config: {classname: PURE_BUTTON_DISABLED+' '+BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[IMGBTN_SAVE]},
labelHTML: function() { return customBtnLabels[IMGBTN_SAVE] ? Lang.sub(customBtnLabels[IMGBTN_SAVE], {label: instance._intl[SAVE]}) : (Lang.sub(IMAGE_BUTTON_TEMPLATE, {type: SAVE})+instance._intl[SAVE]); }
},
{
@@ -2183,7 +2233,7 @@ ITSAViewModel.prototype._createButtons = function() {
{
propertykey: SPINBTN_SAVE,
type: SAVE,
- config: {spinbusy: true, classname: BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[SPINBTN_SAVE]},
+ config: {spinbusy: true, classname: PURE_BUTTON_DISABLED+' '+BUTTON_ICON_LEFT, value: SAVE, hotkey: hotkeys[SPINBTN_SAVE]},
labelHTML: function() { return customBtnLabels[SPINBTN_SAVE] ? Lang.sub(customBtnLabels[SPINBTN_SAVE], {label: instance._intl[SAVE]}) : (Lang.sub(IMAGE_BUTTON_TEMPLATE, {type: SAVE})+instance._intl[SAVE]); }
},
{
@@ -2244,6 +2294,32 @@ ITSAViewModel.prototype[DEF_FN+VALIDATION_ERROR] = function(e) {
};
/**
+ * Disables 'save-buttons' when the model UI-elements gets in initial state
+ *
+ * @method _disableSaveBtns
+ * @private
+ * @since 0.4
+*/
+ITSAViewModel.prototype._disableSaveBtns = function() {
+ var instance = this,
+ saveButtons = instance.get(CONTAINER).all('button[data-buttonsubtype="save"]');
+ saveButtons.addClass(PURE_BUTTON_DISABLED);
+};
+
+/**
+ * Enables 'save-buttons' that were disabled when the model UI-elements were in initial state
+ *
+ * @method _enableSaveBtns
+ * @private
+ * @since 0.4
+*/
+ITSAViewModel.prototype._enableSaveBtns = function() {
+ var instance = this,
+ saveButtons = instance.get(CONTAINER).all('button[data-buttonsubtype="save"]');
+ saveButtons.removeClass(PURE_BUTTON_DISABLED);
+};
+
+/**
* Sets the right className to the container for making text-transForm of buttons. Configured by attribute 'buttonTransform'.<br />
* Either one of these values:
* <ul>
@@ -2366,19 +2442,19 @@ ITSAViewModel.prototype._setSpin = function(buttonType, spin) {
ITSAViewModel.prototype._setTemplateRenderer = function() {
var instance = this,
template = instance.get(TEMPLATE),
- editTemplate = instance.get(EDITABLE),
+ editMode = instance.get(EDITABLE),
isMicroTemplate, ismicrotemplate, compiledModelEngine, buttonsToJSON;
isMicroTemplate = function() {
var microTemplateRegExp = /<%(.+)%>/;
return microTemplateRegExp.test(template);
};
- buttonsToJSON = function(jsondata, model) {
+ buttonsToJSON = function(jsondata, model, micro) {
var propertykey, type, labelHTML, config, propertyEmbraced;
YArray.each(
instance._buttons,
function(buttonobject) {
propertykey = buttonobject.propertykey;
- propertyEmbraced = new RegExp('{'+propertykey+'}');
+ propertyEmbraced = micro ? (new RegExp('<%==? (data|this).'+propertykey+' %>')) : (new RegExp('{'+propertykey+'}'));
if (propertyEmbraced.test(template)) {
type = buttonobject.type;
labelHTML = buttonobject.labelHTML(); // is a function!
@@ -2391,7 +2467,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
YObject.each(
instance._customBtns,
function(buttonobject, propertykey) {
- propertyEmbraced = new RegExp('{'+propertykey+'}');
+ propertyEmbraced = micro ? (new RegExp('<%==? (data|this).'+propertykey+' %>')) : (new RegExp('{'+propertykey+'}'));
if (propertyEmbraced.test(template)) {
labelHTML = buttonobject.labelHTML; // is a property
config = buttonobject.config;
@@ -2404,19 +2480,19 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
if (ismicrotemplate) {
compiledModelEngine = YTemplateMicro.compile(template);
instance._modelRenderer = function(model) {
- var jsondata = editTemplate ? model.toJSONUI(null, template) : instance.toJSON();
+ var jsondata = editMode ? model.toJSONUI(null, template) : instance.toJSON();
// if model is instance of Y.ITSAFormModel, then add the btn_buttontype-properties:
/*jshint expr:true */
- model.toJSONUI && buttonsToJSON(jsondata, model);
+ model.toJSONUI && buttonsToJSON(jsondata, model, true);
/*jshint expr:false */
return compiledModelEngine(jsondata);
};
}
else {
instance._modelRenderer = function(model) {
- var jsondata = editTemplate ? model.toJSONUI(null, template) : instance.toJSON();
+ var jsondata = editMode ? model.toJSONUI(null, template) : instance.toJSON();
/*jshint expr:true */
- model.toJSONUI && buttonsToJSON(jsondata, model);
+ model.toJSONUI && buttonsToJSON(jsondata, model, false);
/*jshint expr:false */
return Lang.sub(template, jsondata);
};
@@ -2426,7 +2502,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
instance._viewNeedsForm = !instance._contIsForm && !(/<form([^>]*)>/.test(template));
};
-}, '@VERSION@', {
+}, 'gallery-2014.01.03-22-50', {
"requires": [
"yui-base",
"gallery-itsapluginpromise",
@@ -2444,6 +2520,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
"event-custom-base",
"oop",
"promise",
+ "json",
"pluginhost-base",
"gallery-itsamodulesloadedpromise",
"gallerycss-itsa-base"
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel",function(e){e.Intl.add("gallery-itsaviewmodel","",{cancel:"Cancel",close:"Close",destroy:"Destroy",remove:"Remove",reset:"Reset",save:"Save",submit:"Submit",load:"Load",reload:"Reload",abort:"Abort",ignore:"Ignore",retry:"Retry",ok:"Ok",yes:"Yes",no:"No",undefined_template:"Template is undefined"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel",function(e){e.Intl.add("gallery-itsaviewmodel","",{cancel:"Cancel",close:"Close",destroy:"Destroy",remove:"Remove",reset:"Reset",save:"Save",submit:"Submit",load:"Load",reload:"Reload",abort:"Abort",ignore:"Ignore",retry:"Retry",ok:"Ok",yes:"Yes",no:"No",undefined_template:"Template is undefined"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ar.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_ar",function(e){e.Intl.add("gallery-itsaviewmodel","ar",{cancel:"\u0625\u0644\u063a\u0627\u0621",close:"\u0623\u063a\u0644\u0642",destroy:"\u0647\u062f\u0645",remove:"\u0646\u0632\u0639",reset:"\u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646",save:"\u062d\u0641\u0638",submit:"\u0639\u0631\u0636",load:"\u062d\u0645\u0644",reload:"\u0625\u0639\u0627\u062f\u0629 \u062a\u062d\u0645\u064a\u0644",abort:"\u0625\u062d\u0628\u0627\u0637",ignore:"\u062a\u062c\u0627\u0647\u0644",retry:"\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629",ok:"\u062d\u0633\u0646\u0627",yes:"\u0646\u0639\u0645",no:"\u0644\u0627",undefined_template:"\u0642\u0627\u0644\u0628 \u063a\u064a\u0631 \u0645\u0639\u0631\u0641"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_ar",function(e){e.Intl.add("gallery-itsaviewmodel","ar",{cancel:"\u0625\u0644\u063a\u0627\u0621",close:"\u0623\u063a\u0644\u0642",destroy:"\u0647\u062f\u0645",remove:"\u0646\u0632\u0639",reset:"\u0625\u0639\u0627\u062f\u0629 \u062a\u0639\u064a\u064a\u0646",save:"\u062d\u0641\u0638",submit:"\u0639\u0631\u0636",load:"\u062d\u0645\u0644",reload:"\u0625\u0639\u0627\u062f\u0629 \u062a\u062d\u0645\u064a\u0644",abort:"\u0625\u062d\u0628\u0627\u0637",ignore:"\u062a\u062c\u0627\u0647\u0644",retry:"\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629",ok:"\u062d\u0633\u0646\u0627",yes:"\u0646\u0639\u0645",no:"\u0644\u0627",undefined_template:"\u0642\u0627\u0644\u0628 \u063a\u064a\u0631 \u0645\u0639\u0631\u0641"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bg.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_bg",function(e){e.Intl.add("gallery-itsaviewmodel","bg",{cancel:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438",close:"\u0411\u043b\u0438\u0437\u043e",destroy:"\u0423\u043d\u0438\u0449\u043e\u0436\u0438",remove:"\u041f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u043d\u0435",reset:"\u0418\u0437\u0447\u0438\u0441\u0442\u0438",save:"\u0421\u043f\u0430\u0441\u044f\u0432\u0430\u043d\u0435",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044f\u0442",load:"\u0417\u0430\u0440\u0435\u0434\u0435\u0442\u0435",reload:"\u041f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438",abort:"\u0410\u0431\u043e\u0440\u0442\u0438\u0440\u0430\u043c",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0430\u043c",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d \u043e\u043f\u0438\u0442",ok:"\u0414\u043e\u0431\u0440\u0435",yes:"\u0414\u0430",no:"\u041d\u0435",undefined_template:"\u0448\u0430\u0431\u043b\u043e\u043d \u0435 \u043d\u0435\u0434\u0435\u0444\u0438\u043d\u0438\u0440\u0430\u043d\u0430"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_bg",function(e){e.Intl.add("gallery-itsaviewmodel","bg",{cancel:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438",close:"\u0411\u043b\u0438\u0437\u043e",destroy:"\u0423\u043d\u0438\u0449\u043e\u0436\u0438",remove:"\u041f\u0440\u0435\u043c\u0430\u0445\u0432\u0430\u043d\u0435",reset:"\u0418\u0437\u0447\u0438\u0441\u0442\u0438",save:"\u0421\u043f\u0430\u0441\u044f\u0432\u0430\u043d\u0435",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044f\u0442",load:"\u0417\u0430\u0440\u0435\u0434\u0435\u0442\u0435",reload:"\u041f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438",abort:"\u0410\u0431\u043e\u0440\u0442\u0438\u0440\u0430\u043c",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0430\u043c",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d \u043e\u043f\u0438\u0442",ok:"\u0414\u043e\u0431\u0440\u0435",yes:"\u0414\u0430",no:"\u041d\u0435",undefined_template:"\u0448\u0430\u0431\u043b\u043e\u043d \u0435 \u043d\u0435\u0434\u0435\u0444\u0438\u043d\u0438\u0440\u0430\u043d\u0430"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bs.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_bs",function(e){e.Intl.add("gallery-itsaviewmodel","bs",{cancel:"Otkazati",close:"Zatvoriti",destroy:"Uni\u0161titi",remove:"Ukloniti",reset:"Resetovanje",save:"Spasiti",submit:"Podnijeti",load:"Optere\u0107enje",reload:"Pretovariti",abort:"Prekid",ignore:"Ignorisati",retry:"Ponovo suditi",ok:"U redu",yes:"Da",no:"Ne",undefined_template:"Predlo\u017eak je neodre\u0111en"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_bs",function(e){e.Intl.add("gallery-itsaviewmodel","bs",{cancel:"Otkazati",close:"Zatvoriti",destroy:"Uni\u0161titi",remove:"Ukloniti",reset:"Resetovanje",save:"Spasiti",submit:"Podnijeti",load:"Optere\u0107enje",reload:"Pretovariti",abort:"Prekid",ignore:"Ignorisati",retry:"Ponovo suditi",ok:"U redu",yes:"Da",no:"Ne",undefined_template:"Predlo\u017eak je neodre\u0111en"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_cs.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_cs",function(e){e.Intl.add("gallery-itsaviewmodel","cs",{cancel:"Zru\u0161it",close:"Zav\u0159\u00edt",destroy:"Zni\u010dit",remove:"Odstranit",reset:"Obnovit",save:"Ulo\u017eit",submit:"P\u0159edlo\u017eit",load:"Zat\u00ed\u017een\u00ed",reload:"Znovu",abort:"P\u0159eru\u0161it",ignore:"Ignorovat",retry:"Opakov\u00e1n\u00ed",ok:"Po\u0159\u00e1dku",yes:"Ano",no:"Ne",undefined_template:"\u0161ablona je definov\u00e1na"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_cs",function(e){e.Intl.add("gallery-itsaviewmodel","cs",{cancel:"Zru\u0161it",close:"Zav\u0159\u00edt",destroy:"Zni\u010dit",remove:"Odstranit",reset:"Obnovit",save:"Ulo\u017eit",submit:"P\u0159edlo\u017eit",load:"Zat\u00ed\u017een\u00ed",reload:"Znovu",abort:"P\u0159eru\u0161it",ignore:"Ignorovat",retry:"Opakov\u00e1n\u00ed",ok:"Po\u0159\u00e1dku",yes:"Ano",no:"Ne",undefined_template:"\u0161ablona je definov\u00e1na"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_da.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_da",function(e){e.Intl.add("gallery-itsaviewmodel","da",{cancel:"Annullere",close:"Lukke",destroy:"Destruere",remove:"Fjern",reset:"Nulstille",save:"Gem",submit:"Indsende",load:"Indl\u00e6se",reload:"Genindl\u00e6se",abort:"Afbryde",ignore:"Ignorere",retry:"Pr\u00f8v igen",ok:"Ok",yes:"Ja",no:"Nej",undefined_template:"Skabelon er udefineret"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_da",function(e){e.Intl.add("gallery-itsaviewmodel","da",{cancel:"Annullere",close:"Lukke",destroy:"Destruere",remove:"Fjern",reset:"Nulstille",save:"Gem",submit:"Indsende",load:"Indl\u00e6se",reload:"Genindl\u00e6se",abort:"Afbryde",ignore:"Ignorere",retry:"Pr\u00f8v igen",ok:"Ok",yes:"Ja",no:"Nej",undefined_template:"Skabelon er udefineret"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_de.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_de",function(e){e.Intl.add("gallery-itsaviewmodel","de",{cancel:"Annullieren",close:"Schlie\u00dfen",destroy:"Vernichten",remove:"Entfernen",reset:"Reset",save:"Speichern",submit:"Senden",load:"Laden",reload:"Erneut laden",abort:"Abbrechen",ignore:"Ignorieren",retry:"Wiederholen",ok:"Ok",yes:"Ja",no:"Nein",undefined_template:"Template ist undefiniert"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_de",function(e){e.Intl.add("gallery-itsaviewmodel","de",{cancel:"Annullieren",close:"Schlie\u00dfen",destroy:"Vernichten",remove:"Entfernen",reset:"Reset",save:"Speichern",submit:"Senden",load:"Laden",reload:"Erneut laden",abort:"Abbrechen",ignore:"Ignorieren",retry:"Wiederholen",ok:"Ok",yes:"Ja",no:"Nein",undefined_template:"Template ist undefiniert"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_en.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_en",function(e){e.Intl.add("gallery-itsaviewmodel","en",{cancel:"Cancel",close:"Close",destroy:"Destroy",remove:"Remove",reset:"Reset",save:"Save",submit:"Submit",load:"Load",reload:"Reload",abort:"Abort",ignore:"Ignore",retry:"Retry",ok:"Ok",yes:"Yes",no:"No",undefined_template:"Template is undefined"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_en",function(e){e.Intl.add("gallery-itsaviewmodel","en",{cancel:"Cancel",close:"Close",destroy:"Destroy",remove:"Remove",reset:"Reset",save:"Save",submit:"Submit",load:"Load",reload:"Reload",abort:"Abort",ignore:"Ignore",retry:"Retry",ok:"Ok",yes:"Yes",no:"No",undefined_template:"Template is undefined"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_es.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_es",function(e){e.Intl.add("gallery-itsaviewmodel","es",{cancel:"Cancelar",close:"Cerrar",destroy:"Destruir",remove:"Eliminar",reset:"Reajustar",save:"Guardar",submit:"Presentar",load:"Cargar",reload:"Recargar",abort:"Anular",ignore:"Ignorar",retry:"Reintento",ok:"Aceptar",yes:"S\u00ed",no:"No",undefined_template:"Plantilla no est\u00e1 definido"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_es",function(e){e.Intl.add("gallery-itsaviewmodel","es",{cancel:"Cancelar",close:"Cerrar",destroy:"Destruir",remove:"Eliminar",reset:"Reajustar",save:"Guardar",submit:"Presentar",load:"Cargar",reload:"Recargar",abort:"Anular",ignore:"Ignorar",retry:"Reintento",ok:"Aceptar",yes:"S\u00ed",no:"No",undefined_template:"Plantilla no est\u00e1 definido"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fa.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_fa",function(e){e.Intl.add("gallery-itsaviewmodel","fa",{cancel:"\u0644\u063a\u0648 \u06a9\u0631\u062f\u0646",close:"\u0646\u0632\u062f\u06cc\u06a9",destroy:"\u0627\u0632 \u0628\u06cc\u0646 \u0628\u0631\u062f\u0646",remove:"\u0628\u0631\u062f\u0627\u0634\u062a\u0646",reset:"\u062a\u0646\u0638\u06cc\u0645 \u0645\u062c\u062f\u062f",save:"\u0635\u0631\u0641\u0647 \u062c\u0648\u06cc\u06cc",submit:"\u0627\u0631\u0633\u0627\u0644",load:"\u0628\u0627\u0631",reload:"\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062c\u062f\u062f",abort:"\u0633\u0642\u0637 \u062c\u0646\u06cc\u0646",ignore:"\u0686\u0634\u0645 \u067e\u0648\u0634\u06cc \u0627\u0632",retry:"\u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f.",ok:"\u062e\u0648\u0628",yes:"\u0628\u0644\u0647",no:"\u0647\u06cc\u0686",undefined_template:"\u0642\u0627\u0644\u0628 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0634\u062f\u0647 \u0627\u0633\u062a"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_fa",function(e){e.Intl.add("gallery-itsaviewmodel","fa",{cancel:"\u0644\u063a\u0648 \u06a9\u0631\u062f\u0646",close:"\u0646\u0632\u062f\u06cc\u06a9",destroy:"\u0627\u0632 \u0628\u06cc\u0646 \u0628\u0631\u062f\u0646",remove:"\u0628\u0631\u062f\u0627\u0634\u062a\u0646",reset:"\u062a\u0646\u0638\u06cc\u0645 \u0645\u062c\u062f\u062f",save:"\u0635\u0631\u0641\u0647 \u062c\u0648\u06cc\u06cc",submit:"\u0627\u0631\u0633\u0627\u0644",load:"\u0628\u0627\u0631",reload:"\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0645\u062c\u062f\u062f",abort:"\u0633\u0642\u0637 \u062c\u0646\u06cc\u0646",ignore:"\u0686\u0634\u0645 \u067e\u0648\u0634\u06cc \u0627\u0632",retry:"\u062f\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f.",ok:"\u062e\u0648\u0628",yes:"\u0628\u0644\u0647",no:"\u0647\u06cc\u0686",undefined_template:"\u0642\u0627\u0644\u0628 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0634\u062f\u0647 \u0627\u0633\u062a"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fi.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_fi",function(e){e.Intl.add("gallery-itsaviewmodel","fi",{cancel:"Peruuttaa",close:"L\u00e4hell\u00e4",destroy:"Tuhota",remove:"Poistaa",reset:"Nollaa",save:"S\u00e4\u00e4st\u00e4\u00e4",submit:"Esitt\u00e4\u00e4",load:"Kuormitus",abort:"Keskeytt\u00e4\u00e4",reload:"Ladata",ignore:"Sivuuttaa",retry:"Uudelleen",ok:"Kunnossa",yes:"Kyll\u00e4",no:"Ei",undefined_template:"Mallipohjalla on m\u00e4\u00e4rittelem\u00e4t\u00f6n"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_fi",function(e){e.Intl.add("gallery-itsaviewmodel","fi",{cancel:"Peruuttaa",close:"L\u00e4hell\u00e4",destroy:"Tuhota",remove:"Poistaa",reset:"Nollaa",save:"S\u00e4\u00e4st\u00e4\u00e4",submit:"Esitt\u00e4\u00e4",load:"Kuormitus",abort:"Keskeytt\u00e4\u00e4",reload:"Ladata",ignore:"Sivuuttaa",retry:"Uudelleen",ok:"Kunnossa",yes:"Kyll\u00e4",no:"Ei",undefined_template:"Mallipohjalla on m\u00e4\u00e4rittelem\u00e4t\u00f6n"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fr.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_fr",function(e){e.Intl.add("gallery-itsaviewmodel","fr",{cancel:"R\u00e9silier",close:"Proche",destroy:"D\u00e9truire",remove:"Supprimer",reset:"Reset",save:"Conserver",submit:"Soumettre",load:"Charger",reload:"Recharger",abort:"Abort",ignore:"Ignorer",retry:"Retry",ok:"Ok",yes:"Oui",no:"Non",undefined_template:"Gabarit est ind\u00e9fini"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_fr",function(e){e.Intl.add("gallery-itsaviewmodel","fr",{cancel:"R\u00e9silier",close:"Proche",destroy:"D\u00e9truire",remove:"Supprimer",reset:"Reset",save:"Conserver",submit:"Soumettre",load:"Charger",reload:"Recharger",abort:"Abort",ignore:"Ignorer",retry:"Retry",ok:"Ok",yes:"Oui",no:"Non",undefined_template:"Gabarit est ind\u00e9fini"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_he.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_he",function(e){e.Intl.add("gallery-itsaviewmodel","he",{cancel:"\u05dc\u05d1\u05d8\u05dc",close:"\u05dc\u05e1\u05d2\u05d5\u05e8",destroy:"\u05dc\u05d4\u05e8\u05d5\u05e1",remove:"\u05dc\u05d4\u05e1\u05d9\u05e8",reset:"\u05dc\u05d0\u05ea\u05d7\u05dc",save:"\u05dc\u05d7\u05e1\u05d5\u05da",submit:"\u05dc\u05d4\u05d2\u05d9\u05e9",load:"\u05dc\u05d8\u05e2\u05d5\u05df",reload:"\u05dc\u05d8\u05e2\u05d5\u05df \u05de\u05d7\u05d3\u05e9",abort:"\u05dc\u05d4\u05e4\u05d9\u05dc",ignore:"\u05dc\u05d4\u05ea\u05e2\u05dc\u05dd",retry:"\u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1",ok:"\u05d1\u05e1\u05d3\u05e8",yes:"\u05db\u05df",no:"\u05dc\u05d0",undefined_template:"\u05d4\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05d9\u05d0 \u05dc\u05d0 \u05de\u05d5\u05d2\u05d3\u05e8\u05ea"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_he",function(e){e.Intl.add("gallery-itsaviewmodel","he",{cancel:"\u05dc\u05d1\u05d8\u05dc",close:"\u05dc\u05e1\u05d2\u05d5\u05e8",destroy:"\u05dc\u05d4\u05e8\u05d5\u05e1",remove:"\u05dc\u05d4\u05e1\u05d9\u05e8",reset:"\u05dc\u05d0\u05ea\u05d7\u05dc",save:"\u05dc\u05d7\u05e1\u05d5\u05da",submit:"\u05dc\u05d4\u05d2\u05d9\u05e9",load:"\u05dc\u05d8\u05e2\u05d5\u05df",reload:"\u05dc\u05d8\u05e2\u05d5\u05df \u05de\u05d7\u05d3\u05e9",abort:"\u05dc\u05d4\u05e4\u05d9\u05dc",ignore:"\u05dc\u05d4\u05ea\u05e2\u05dc\u05dd",retry:"\u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1",ok:"\u05d1\u05e1\u05d3\u05e8",yes:"\u05db\u05df",no:"\u05dc\u05d0",undefined_template:"\u05d4\u05ea\u05d1\u05e0\u05d9\u05ea \u05d4\u05d9\u05d0 \u05dc\u05d0 \u05de\u05d5\u05d2\u05d3\u05e8\u05ea"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hi.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_hi",function(e){e.Intl.add("gallery-itsaviewmodel","hi",{cancel:"\u0930\u0926\u094d\u0926 \u0915\u0930\u0947\u0902",close:"\u092c\u0902\u0926 \u0915\u0930\u0947\u0902",destroy:"\u0928\u0937\u094d\u091f",remove:"\u0939\u091f\u093e\u0928\u093e",reset:"\u0930\u0940\u0938\u0947\u091f \u0915\u0930\u0947\u0902",save:"\u092c\u091a\u093e\u0928\u093e",submit:"\u092a\u094d\u0930\u0938\u094d\u0924\u0941\u0924 \u0915\u0930\u0928\u093e",load:"\u092d\u093e\u0930",reload:"\u0938\u0940\u092e\u093e \u0938\u0947 \u0905\u0927\u093f\u0915 \u0932\u093e\u0926\u0928\u093e",abort:"\u0917\u0930\u094d\u092d\u092a\u093e\u0924",ignore:"\u0909\u092a\u0947\u0915\u094d\u0937\u093e",retry:"\u092a\u0941\u0928: \u092a\u094d\u0930\u092f\u093e\u0938",ok:"\u0920\u0940\u0915",yes:"\u0939\u093e\u0902",no:"\u0928\u0939\u0940\u0902",undefined_template:"\u091f\u0947\u092e\u094d\u092a\u0932\u0947\u091f \u0905\u092a\u0930\u093f\u092d\u093e\u0937\u093f\u0924 \u0939\u0948"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_hi",function(e){e.Intl.add("gallery-itsaviewmodel","hi",{cancel:"\u0930\u0926\u094d\u0926 \u0915\u0930\u0947\u0902",close:"\u092c\u0902\u0926 \u0915\u0930\u0947\u0902",destroy:"\u0928\u0937\u094d\u091f",remove:"\u0939\u091f\u093e\u0928\u093e",reset:"\u0930\u0940\u0938\u0947\u091f \u0915\u0930\u0947\u0902",save:"\u092c\u091a\u093e\u0928\u093e",submit:"\u092a\u094d\u0930\u0938\u094d\u0924\u0941\u0924 \u0915\u0930\u0928\u093e",load:"\u092d\u093e\u0930",reload:"\u0938\u0940\u092e\u093e \u0938\u0947 \u0905\u0927\u093f\u0915 \u0932\u093e\u0926\u0928\u093e",abort:"\u0917\u0930\u094d\u092d\u092a\u093e\u0924",ignore:"\u0909\u092a\u0947\u0915\u094d\u0937\u093e",retry:"\u092a\u0941\u0928: \u092a\u094d\u0930\u092f\u093e\u0938",ok:"\u0920\u0940\u0915",yes:"\u0939\u093e\u0902",no:"\u0928\u0939\u0940\u0902",undefined_template:"\u091f\u0947\u092e\u094d\u092a\u0932\u0947\u091f \u0905\u092a\u0930\u093f\u092d\u093e\u0937\u093f\u0924 \u0939\u0948"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hr.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_hr",function(e){e.Intl.add("gallery-itsaviewmodel","hr",{cancel:"Otkazati",close:"Zatvoriti",destroy:"Uni\u0161titi",remove:"Ukloniti",reset:"Resetirati",save:"Spasiti",submit:"Podnijeti",load:"Optere\u0107enje",reload:"Pretovariti",abort:"Pobaciti",ignore:"Ignorirati",retry:"Ponovni poku\u0161aj",ok:"U redu",yes:"Da",no:"Ne",undefined_template:"Predlo\u017eak je nedefiniran"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_hr",function(e){e.Intl.add("gallery-itsaviewmodel","hr",{cancel:"Otkazati",close:"Zatvoriti",destroy:"Uni\u0161titi",remove:"Ukloniti",reset:"Resetirati",save:"Spasiti",submit:"Podnijeti",load:"Optere\u0107enje",reload:"Pretovariti",abort:"Pobaciti",ignore:"Ignorirati",retry:"Ponovni poku\u0161aj",ok:"U redu",yes:"Da",no:"Ne",undefined_template:"Predlo\u017eak je nedefiniran"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hu.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_hu",function(e){e.Intl.add("gallery-itsaviewmodel","hu",{cancel:"T\u00f6rl\u00e9se",close:"K\u00f6zeli",destroy:"Elpuszt\u00edt",remove:"Elt\u00e1vol\u00edt",reset:"Vissza\u00e1ll\u00edt\u00e1sa",save:"Kiv\u00e9ve",submit:"Submit",load:"Terhel\u00e9s",reload:"B\u00f6ng\u00e9sz\u0151dben",abort:"Megszak\u00edtja",ignore:"Figyelmen k\u00edv\u00fcl hagy",retry:"\u00dajra",ok:"Rendben",yes:"Igen",no:"Nincs",undefined_template:"Sablon nem defini\u00e1lt"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_hu",function(e){e.Intl.add("gallery-itsaviewmodel","hu",{cancel:"T\u00f6rl\u00e9se",close:"K\u00f6zeli",destroy:"Elpuszt\u00edt",remove:"Elt\u00e1vol\u00edt",reset:"Vissza\u00e1ll\u00edt\u00e1sa",save:"Kiv\u00e9ve",submit:"Submit",load:"Terhel\u00e9s",reload:"B\u00f6ng\u00e9sz\u0151dben",abort:"Megszak\u00edtja",ignore:"Figyelmen k\u00edv\u00fcl hagy",retry:"\u00dajra",ok:"Rendben",yes:"Igen",no:"Nincs",undefined_template:"Sablon nem defini\u00e1lt"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_it.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_it",function(e){e.Intl.add("gallery-itsaviewmodel","it",{cancel:"T\u00f6rl\u00e9se",close:"Chiudere",destroy:"Elpuszt\u00edt",remove:"Elt\u00e1vol\u00edt",reset:"Vissza\u00e1ll\u00edt\u00e1sa",save:"Salva",submit:"Presentare",load:"Caricare",reload:"Ricaricare",abort:"Abort",ignore:"Ignorare",retry:"Riprovare",ok:"Ok",yes:"S\u00ec",no:"No",undefined_template:"Template non \u00e8 definito"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_it",function(e){e.Intl.add("gallery-itsaviewmodel","it",{cancel:"T\u00f6rl\u00e9se",close:"Chiudere",destroy:"Elpuszt\u00edt",remove:"Elt\u00e1vol\u00edt",reset:"Vissza\u00e1ll\u00edt\u00e1sa",save:"Salva",submit:"Presentare",load:"Caricare",reload:"Ricaricare",abort:"Abort",ignore:"Ignorare",retry:"Riprovare",ok:"Ok",yes:"S\u00ec",no:"No",undefined_template:"Template non \u00e8 definito"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ja.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_ja",function(e){e.Intl.add("gallery-itsaviewmodel","ja",{cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",close:"\u30af\u30ed\u30fc\u30ba",destroy:"\u7834\u58ca\u3059\u308b",remove:"\u524a\u9664\u3059\u308b",reset:"\u30ea\u30bb\u30c3\u30c8",save:"\u4fdd\u5b58",submit:"\u63d0\u51fa\u3059\u308b",load:"\u30ed\u30fc\u30c9",reload:"\u30ea\u30ed\u30fc\u30c9",abort:"\u4e2d\u6b62",ignore:"\u7121\u8996\u3059\u308b",retry:"\u30ea\u30c8\u30e9\u30a4",ok:"\u826f\u3044",yes:"\u306f\u3044",no:"\u30ce\u30fc",undefined_template:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_ja",function(e){e.Intl.add("gallery-itsaviewmodel","ja",{cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",close:"\u30af\u30ed\u30fc\u30ba",destroy:"\u7834\u58ca\u3059\u308b",remove:"\u524a\u9664\u3059\u308b",reset:"\u30ea\u30bb\u30c3\u30c8",save:"\u4fdd\u5b58",submit:"\u63d0\u51fa\u3059\u308b",load:"\u30ed\u30fc\u30c9",reload:"\u30ea\u30ed\u30fc\u30c9",abort:"\u4e2d\u6b62",ignore:"\u7121\u8996\u3059\u308b",retry:"\u30ea\u30c8\u30e9\u30a4",ok:"\u826f\u3044",yes:"\u306f\u3044",no:"\u30ce\u30fc",undefined_template:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nb.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_nb",function(e){e.Intl.add("gallery-itsaviewmodel","nb",{cancel:"Avbryte",close:"Lukke",destroy:"\u00d8delegg",remove:"Fjerne",reset:"Tilbakestille",save:"Spare",submit:"Sende inn",load:"Last",reload:"Lesse",abort:"Abortere",ignore:"Ignorere",retry:"Nytt fors\u00f8k",ok:"Ok",yes:"Ja",no:"No",undefined_template:"Malen er udefinert"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_nb",function(e){e.Intl.add("gallery-itsaviewmodel","nb",{cancel:"Avbryte",close:"Lukke",destroy:"\u00d8delegg",remove:"Fjerne",reset:"Tilbakestille",save:"Spare",submit:"Sende inn",load:"Last",reload:"Lesse",abort:"Abortere",ignore:"Ignorere",retry:"Nytt fors\u00f8k",ok:"Ok",yes:"Ja",no:"No",undefined_template:"Malen er udefinert"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nl.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_nl",function(e){e.Intl.add("gallery-itsaviewmodel","nl",{cancel:"Annuleer",close:"Sluiten",destroy:"Vernietig",remove:"Verwijder",reset:"Herstel",save:"Opslaan",submit:"Verstuur",abort:"Afbreken",load:"Laden",reload:"Herladen",ignore:"Negeer",retry:"Opnieuw",ok:"Bevestig",yes:"Ja",no:"Nee",undefined_template:"Template is ongedefinieerd"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_nl",function(e){e.Intl.add("gallery-itsaviewmodel","nl",{cancel:"Annuleer",close:"Sluiten",destroy:"Vernietig",remove:"Verwijder",reset:"Herstel",save:"Opslaan",submit:"Verstuur",abort:"Afbreken",load:"Laden",reload:"Herladen",ignore:"Negeer",retry:"Opnieuw",ok:"Ok",yes:"Ja",no:"Nee",undefined_template:"Template is ongedefinieerd"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pl.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_pl",function(e){e.Intl.add("gallery-itsaviewmodel","pl",{cancel:"Anulowa\u0107",close:"Zamkn\u0105\u0107",destroy:"Zniszczy\u0107",remove:"Usun\u0105\u0107",reset:"Zresetowa\u0107",save:"Oszcz\u0119dza\u0107",submit:"Przedk\u0142ada\u0107",load:"Za\u0142adowa\u0107",reload:"Prze\u0142adowa\u0107",abort:"Poroni\u0107",ignore:"Ignorowa\u0107",retry:"Spr\u00f3bowa\u0107 ponownie",ok:"Dobrze",yes:"Tak",no:"Nie",undefined_template:"Szablon jest niezdefiniowane"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_pl",function(e){e.Intl.add("gallery-itsaviewmodel","pl",{cancel:"Anulowa\u0107",close:"Zamkn\u0105\u0107",destroy:"Zniszczy\u0107",remove:"Usun\u0105\u0107",reset:"Zresetowa\u0107",save:"Oszcz\u0119dza\u0107",submit:"Przedk\u0142ada\u0107",load:"Za\u0142adowa\u0107",reload:"Prze\u0142adowa\u0107",abort:"Poroni\u0107",ignore:"Ignorowa\u0107",retry:"Spr\u00f3bowa\u0107 ponownie",ok:"Dobrze",yes:"Tak",no:"Nie",undefined_template:"Szablon jest niezdefiniowane"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pt.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_pt",function(e){e.Intl.add("gallery-itsaviewmodel","pt",{cancel:"Cancelar",close:"Fechar",destroy:"Destruir",remove:"Remover",reset:"Restabelecer",save:"Salvar",submit:"Submeter",load:"Carregar",reload:"Recarregar",abort:"Abortar",ignore:"Ignorar",retry:"Tentar novamente",ok:"Ok",yes:"Sim",no:"N\u00e3o",undefined_template:"Template \u00e9 indefinido"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_pt",function(e){e.Intl.add("gallery-itsaviewmodel","pt",{cancel:"Cancelar",close:"Fechar",destroy:"Destruir",remove:"Remover",reset:"Restabelecer",save:"Salvar",submit:"Submeter",load:"Carregar",reload:"Recarregar",abort:"Abortar",ignore:"Ignorar",retry:"Tentar novamente",ok:"Ok",yes:"Sim",no:"N\u00e3o",undefined_template:"Template \u00e9 indefinido"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ru.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_ru",function(e){e.Intl.add("gallery-itsaviewmodel","ru",{cancel:"O\u0442\u043c\u0435\u043d\u0438\u0442\u044c",close:"\u0411\u043b\u0438\u0437\u044c\u043a\u043e",destroy:"\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u044c",remove:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435",reset:"\u0421\u0431\u0440\u043e\u0441",save:"\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c",load:"\u042d\u0430\u0433\u0440\u0443\u0437\u043a\u0430",reload:"\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c",abort:"\u0412\u044b\u043a\u0438\u043d\u0443\u0442\u044c",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0430",ok:"X\u043e\u0440\u043e\u0448\u043e",yes:"\u0414\u0430",no:"\u041d\u0435\u0442",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_ru",function(e){e.Intl.add("gallery-itsaviewmodel","ru",{cancel:"O\u0442\u043c\u0435\u043d\u0438\u0442\u044c",close:"\u0411\u043b\u0438\u0437\u044c\u043a\u043e",destroy:"\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u044c",remove:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435",reset:"\u0421\u0431\u0440\u043e\u0441",save:"\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c",load:"\u042d\u0430\u0433\u0440\u0443\u0437\u043a\u0430",reload:"\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c",abort:"\u0412\u044b\u043a\u0438\u043d\u0443\u0442\u044c",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0430",ok:"X\u043e\u0440\u043e\u0448\u043e",yes:"\u0414\u0430",no:"\u041d\u0435\u0442",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sk.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_sk",function(e){e.Intl.add("gallery-itsaviewmodel","sk",{cancel:"Zru\u0161i\u0165",close:"Zavrie\u0165",destroy:"Zni\u010di\u0165",remove:"Odstr\u00e1ni\u0165",reset:"Obnovi\u0165",save:"Ulo\u017ei\u0165",submit:"Predlo\u017ei\u0165",load:"Za\u0165a\u017eenie",reload:"Znova",abort:"Preru\u0161i\u0165",ignore:"Ignorova\u0165",retry:"Opakovanie",ok:"Ok",yes:"\u00c1no",no:"Nie",undefined_template:"\u0161abl\u00f3na je definovan\u00e1"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_sk",function(e){e.Intl.add("gallery-itsaviewmodel","sk",{cancel:"Zru\u0161i\u0165",close:"Zavrie\u0165",destroy:"Zni\u010di\u0165",remove:"Odstr\u00e1ni\u0165",reset:"Obnovi\u0165",save:"Ulo\u017ei\u0165",submit:"Predlo\u017ei\u0165",load:"Za\u0165a\u017eenie",reload:"Znova",abort:"Preru\u0161i\u0165",ignore:"Ignorova\u0165",retry:"Opakovanie",ok:"Ok",yes:"\u00c1no",no:"Nie",undefined_template:"\u0161abl\u00f3na je definovan\u00e1"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sr.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_sr",function(e){e.Intl.add("gallery-itsaviewmodel","sr",{cancel:"O\u0442\u043a\u0430\u0437\u0430\u0442\u0438",close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438\u0442\u0438",destroy:"\u0423\u043d\u0438\u0448\u0442\u0438\u0442\u0438",remove:"\u0423\u043a\u043b\u043e\u043d\u0438\u0442\u0438",reset:"P\u0435\u0441\u0435\u0442\u043e\u0432\u0430\u045a\u0435",save:"\u0421\u0430\u0447\u0443\u0432\u0430\u0442\u0438",submit:"\u041f\u043e\u0434\u043d\u0435\u0442\u0438",load:"O\u043f\u0442\u0435\u0440\u0435\u045b\u0435\u045a\u0435",reload:"\u041f\u043e\u043d\u043e\u0432\u043e \u043d\u0430\u043f\u0443\u043d\u0438\u0442\u0438",abort:"\u041f\u0440\u0435\u043a\u0438\u0434",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0441\u0430\u0442\u0438",retry:"\u041f\u043e\u043d\u043e\u0432\u043e \u0441\u0443\u0434\u0438\u0442\u0438",ok:"\u0423 \u0440\u0435\u0434\u0443",yes:"\u0414\u0430",no:"\u041d\u0435",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d \u0458\u0435 \u0434\u0435\u0444\u0438\u043d\u0438\u0441\u0430\u043d\u0430"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_sr",function(e){e.Intl.add("gallery-itsaviewmodel","sr",{cancel:"O\u0442\u043a\u0430\u0437\u0430\u0442\u0438",close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438\u0442\u0438",destroy:"\u0423\u043d\u0438\u0448\u0442\u0438\u0442\u0438",remove:"\u0423\u043a\u043b\u043e\u043d\u0438\u0442\u0438",reset:"P\u0435\u0441\u0435\u0442\u043e\u0432\u0430\u045a\u0435",save:"\u0421\u0430\u0447\u0443\u0432\u0430\u0442\u0438",submit:"\u041f\u043e\u0434\u043d\u0435\u0442\u0438",load:"O\u043f\u0442\u0435\u0440\u0435\u045b\u0435\u045a\u0435",reload:"\u041f\u043e\u043d\u043e\u0432\u043e \u043d\u0430\u043f\u0443\u043d\u0438\u0442\u0438",abort:"\u041f\u0440\u0435\u043a\u0438\u0434",ignore:"\u0418\u0433\u043d\u043e\u0440\u0438\u0441\u0430\u0442\u0438",retry:"\u041f\u043e\u043d\u043e\u0432\u043e \u0441\u0443\u0434\u0438\u0442\u0438",ok:"\u0423 \u0440\u0435\u0434\u0443",yes:"\u0414\u0430",no:"\u041d\u0435",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d \u0458\u0435 \u0434\u0435\u0444\u0438\u043d\u0438\u0441\u0430\u043d\u0430"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sv.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_sv",function(e){e.Intl.add("gallery-itsaviewmodel","sv",{cancel:"Avbryta",close:"N\u00e4ra",destroy:"F\u00f6rst\u00f6ra",remove:"Avl\u00e4gsna",reset:"\u00c5terst\u00e4ll",save:"Spara",submit:"L\u00e4mna",load:"Ladda",reload:"Ladda om",abort:"Avbryta",ignore:"Ignorera",retry:"F\u00f6rs\u00f6ka igen",ok:"Ok",yes:"Ja",no:"Ingen",undefined_template:"Mall \u00e4r odefinierad"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_sv",function(e){e.Intl.add("gallery-itsaviewmodel","sv",{cancel:"Avbryta",close:"N\u00e4ra",destroy:"F\u00f6rst\u00f6ra",remove:"Avl\u00e4gsna",reset:"\u00c5terst\u00e4ll",save:"Spara",submit:"L\u00e4mna",load:"Ladda",reload:"Ladda om",abort:"Avbryta",ignore:"Ignorera",retry:"F\u00f6rs\u00f6ka igen",ok:"Ok",yes:"Ja",no:"Ingen",undefined_template:"Mall \u00e4r odefinierad"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_uk.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_uk",function(e){e.Intl.add("gallery-itsaviewmodel","uk",{cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438",close:"\u0411\u043b\u0438\u0437\u044c\u043a\u043e",destroy:"\u0417\u043d\u0438\u0449\u0438\u0442\u0438",remove:"\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f",reset:"\u0421\u043a\u0438\u0434\u0430\u043d\u043d\u044f",save:"\u0415\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0438",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u0438",load:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",reload:"\u041f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0442\u0438",abort:"\u0412\u0438\u043a\u0438\u043d\u0443\u0442\u0438",ignore:"I\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0443",ok:"\u0414\u043e\u0431\u0440\u0435",yes:"\u0414\u0430",no:"\u041d\u0435\u043c\u0430\u0454",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d\u0443 \u043d\u0435 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043e"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_uk",function(e){e.Intl.add("gallery-itsaviewmodel","uk",{cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438",close:"\u0411\u043b\u0438\u0437\u044c\u043a\u043e",destroy:"\u0417\u043d\u0438\u0449\u0438\u0442\u0438",remove:"\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f",reset:"\u0421\u043a\u0438\u0434\u0430\u043d\u043d\u044f",save:"\u0415\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0438",submit:"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u0438",load:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",reload:"\u041f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0442\u0438",abort:"\u0412\u0438\u043a\u0438\u043d\u0443\u0442\u0438",ignore:"I\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438",retry:"\u041f\u043e\u0432\u0442\u043e\u0440\u0443",ok:"\u0414\u043e\u0431\u0440\u0435",yes:"\u0414\u0430",no:"\u041d\u0435\u043c\u0430\u0454",undefined_template:"\u0428\u0430\u0431\u043b\u043e\u043d\u0443 \u043d\u0435 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043e"})},"gallery-2014.01.03-22-50");
View
2 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_zh.js
@@ -1 +1 @@
-YUI.add("lang/gallery-itsaviewmodel_zh",function(e){e.Intl.add("gallery-itsaviewmodel","zh",{cancel:"\u53d6\u6d88",close:"\u95dc\u9589",destroy:"\u7834\u58de",remove:"\u6d88\u9664",reset:"\u5fa9\u4f4d",save:"\u7bc0\u7701",submit:"\u63d0\u4ea4",load:"\u52a0\u8f09",reload:"\u91cd\u88dd",abort:"\u9000\u51fa",ignore:"\u5ffd\u7565",retry:"\u91cd\u8a66",ok:"\u884c",yes:"\u662f",no:"\u6c92\u6709",undefined_template:"\u6a21\u677f\u662f\u4e0d\u78ba\u5b9a\u7684"})},"@VERSION@");
+YUI.add("lang/gallery-itsaviewmodel_zh",function(e){e.Intl.add("gallery-itsaviewmodel","zh",{cancel:"\u53d6\u6d88",close:"\u95dc\u9589",destroy:"\u7834\u58de",remove:"\u6d88\u9664",reset:"\u5fa9\u4f4d",save:"\u7bc0\u7701",submit:"\u63d0\u4ea4",load:"\u52a0\u8f09",reload:"\u91cd\u88dd",abort:"\u9000\u51fa",ignore:"\u5ffd\u7565",retry:"\u91cd\u8a66",ok:"\u884c",yes:"\u662f",no:"\u6c92\u6709",undefined_template:"\u6a21\u677f\u662f\u4e0d\u78ba\u5b9a\u7684"})},"gallery-2014.01.03-22-50");
View
29 src/gallery-itsaviewmodel/assets/gallery-itsaviewmodel/gallery-itsaviewmodel-core.css
@@ -47,6 +47,35 @@
transition: 0.05s linear box-shadow;
}
+.itsaviewmodel .pure-form div[data-type="editorBase"] {
+ display: inline-block;
+ height: 10em;
+ border: 1px solid #ccc;
+ box-shadow: inset 0 1px 3px #ddd;
+ border-radius: 4px;
+ -webkit-transition: 0.3s linear border;
+ -moz-transition: 0.3s linear border;
+ -ms-transition: 0.3s linear border;
+ -o-transition: 0.3s linear border;
+ transition: 0.3s linear border;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.itsaviewmodel .pure-form div[data-type="editorBase"].itsa-focused {
+ outline: 0;
+ outline: thin dotted \9; /* IE6-9 */
+ border-color: #129FEA;
+}
+
+.itsaviewmodel .pure-form-aligned div[data-type="editorBase"] {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+ width: 14em;
+}
+
/* speed-up Transitions-time pure-inputs from 0.3s to 0.1s */
.itsaviewmodel .pure-form input[type="text"],
.itsaviewmodel .pure-form input[type="password"],
View
14 src/gallery-itsaviewmodel/docs/partials/changing-template-css.mustache
@@ -1,3 +1,17 @@
#viewcont {
min-height: 75px;
+}
+#viewcont ul.tracks {
+ border: solid 1px #666;
+ padding: 0;
+}
+#viewcont ul.tracks li {
+ list-style: none;
+ padding: 1px 10px;
+}
+#viewcont ul.tracks li.even {
+ background-color: #F0F1F8;
+}
+#viewcont ul.tracks li.odd {
+ background-color: #FFF;
}
View
2 src/gallery-itsaviewmodel/docs/partials/forms-css.mustache
@@ -1,4 +1,4 @@
.viewcont {
- height: 217px;
+ height: 350px;
margin-bottom: 20px;
}
View
11 src/gallery-itsaviewmodel/docs/partials/forms-js.mustache
@@ -1,4 +1,4 @@
-YUI(yuiconfig).use('gallery-itsaformmodel', 'gallery-itsaviewmodel', 'slider', 'json-stringify', 'gallery-itsadialog', function(Y) {
+YUI(yuiconfig).use('gallery-itsaformmodel', 'gallery-itsaviewmodel', 'slider', 'json-stringify', 'gallery-itsadialog', 'editor-base', function(Y) {
var view, artist, template;
// adding skin sam to body for getting the right skin for the widgets
@@ -28,12 +28,15 @@ YUI(yuiconfig).use('gallery-itsaformmodel', 'gallery-itsaviewmodel', 'slider', '
}
},
country: {
- formtype: 'text',
+ formtype: Y.EditorBase,
formconfig: {
label: 'Country',
placeholder: 'country',
required: true,
- initialfocus: true
+ initialfocus: true,
+ widgetconfig: {
+ toolbar: true
+ }
}
},
firstalbum: {
@@ -59,7 +62,7 @@ YUI(yuiconfig).use('gallery-itsaformmodel', 'gallery-itsaviewmodel', 'slider', '
artist = new Y.ArtistModel({
name: 'U2',
- country: 'Ireland',
+ country: 'Ir<b>el</b>and',
firstalbum: 'Boy',
release: 1980
});
View
7 src/gallery-itsaviewmodel/docs/partials/loaderconfig-js.mustache
@@ -1,17 +1,16 @@
var itsagallerydir = (itsagalleryversion ? itsagalleryversion+'/' : ''),
filter = (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw',
yuiconfig = {
- base : loaderdomain+'/yui3/'+yui3version+'/build/',
+ base : loaderdomain+'/combo?yui3/'+yui3version+'/build/',
comboBase: loaderdomain+'/combo?',
root : 'yui3/'+yui3version+'/build/',
combine : combine,
-// filter : 'debug',
filter : filter,
coverage : coverage,
groups : {
itsagallery : {
combine : combine,
- base : loaderdomain+'/itsa-gallery/' + itsagallerydir + 'build/',
+ base : loaderdomain+'/combo?itsa-gallery/' + itsagallerydir + 'build/',
comboBase: loaderdomain+'/combo?',
root : 'itsa-gallery/' + itsagallerydir + 'build/',
patterns:
@@ -24,7 +23,7 @@ var itsagallerydir = (itsagalleryversion ? itsagalleryversion+'/' : ''),
},
gallery : {
combine : combine,
- base : loaderdomain+'/yui3-gallery/'+galleryversion+'/build/',
+ base : loaderdomain+'/combo?yui3-gallery/'+galleryversion+'/build/',
comboBase: loaderdomain+'/combo?',
root : 'yui3-gallery/'+galleryversion+'/build/',
patterns:
View
9 src/gallery-itsaviewmodel/docs/partials/promised-syncing-js.mustache
@@ -11,7 +11,14 @@ YUI(yuiconfig).use('gallery-itsaformmodel', 'gallery-itsaviewmodel', 'slider', '
// when 'syncPromise' is defined, Y.ITSAFormModel will use this method instead of 'sync'
syncPromise: function (action, options) {
if (action==='submit') {
- return Y.io.post('http://mydomain.com/senddata.php?model='+Y.JSON.stringify(this.toJSON()));
+// The code should look like this:
+//
+// return Y.io.post('http://mydomain.com/senddata.php', {data: this.toJSON()});
+//
+// But now we simulate through a timeout:
+ return new Y.Promise(function (resolve, reject) {
+ Y.later(1000, null, resolve);
+ });
}
// do not forget to reject the promise in case an invalid 'action' is defined
return new Y.Promise(function (resolve, reject) {
View
2 src/gallery-itsaviewmodel/docs/promised-syncing.mustache
@@ -6,7 +6,7 @@
<div class="intro">
<p>
- {{description}} Because the submission is done to an unexisting url, this example will throw an error.
+ {{description}} Submission is simulated by timeout. Look at the commented code to find out how the setup reaally should be..
</p>
</div>
View
189 src/gallery-itsaviewmodel/js/gallery-itsaviewmodel.js
@@ -1123,7 +1123,7 @@ ITSAViewModel.prototype.removePrimaryButton = function() {
* @since 0.3
*
*/
-ITSAViewModel.prototype.render = function (clear) {
+ITSAViewModel.prototype.render = function (clear, modelchange) {
var instance = this,
container = instance.get(CONTAINER),
model = instance.get(MODEL),
@@ -1134,6 +1134,21 @@ ITSAViewModel.prototype.render = function (clear) {
html = (clear || !model) ? '' : instance._modelRenderer(model),
withfocusmanager;
Y.log('render', 'info', 'ITSA-ViewModel');
+/*jshint expr:true */
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+
+ // WELL: it seems we cannot call cleanup in no cases at all --> after *:change the view will be rerendered and
+ // this seems to lead into buttons not listening to click (empty model-internals)
+ // THUS: commented next line:
+
+// modelchange && !instance.get('partOfMultiView') && model && model.toJSONUI && model.cleanup();
+
+
+
+/*jshint expr:false */
// Render this view's HTML into the container element.
// Because Y.Node.setHTML DOES NOT destroy its nodes (!) but only remove(), we destroy them ourselves first
if (editMode || instance._isMicroTemplate) {
@@ -1143,7 +1158,13 @@ ITSAViewModel.prototype.render = function (clear) {
container.cleanup(instance._rendered);
}
else {
- container.cleanup(false);
+ // we should do a cleanup always, BUT
+ // due to a bug that we haven't found yet, cleanup is no good when using itsaviewmodelpanel, where the footer
+ // gets rerendered --> some node in the footer gets referenced while it doesn;t exists anymore.
+ // that's why the conditional is created.
+ if (!modelchange || !instance.get('partOfMultiView')) {
+ container.cleanup(false);
+ }
}
// Append the container element to the DOM if it's not on the page already.
if (!instance._rendered) {
@@ -1584,11 +1605,12 @@ ITSAViewModel.prototype._bindUI = function() {
container = instance.get(CONTAINER),
eventhandlers = instance._eventhandlers;
Y.log('_bindUI', 'info', 'ITSA-ViewModel');
+
eventhandlers.push(
instance.after(
MODEL+CHANGE,
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
var prevVal = e.prevVal,
newVal = e.newVal,
prevFormModel = prevVal && prevVal.toJSONUI,
@@ -1609,7 +1631,6 @@ ITSAViewModel.prototype._bindUI = function() {
);
}
}
-
(prevFormModel !== newFormModel) && newFormModel && instance.get(TEMPLATE) && instance._setTemplateRenderer();
/*jshint expr:false */
instance.render();
@@ -1620,7 +1641,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
TEMPLATE+CHANGE,
function() {
- Y.log('aftersubscriptor templateChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor templateChange', 'info', 'ITSA-ViewModel');
if (instance.get(MODEL)) {
instance._setTemplateRenderer();
instance.render();
@@ -1636,9 +1657,9 @@ ITSAViewModel.prototype._bindUI = function() {
);
eventhandlers.push(
instance.after(
- RESET,
+ '*:'+RESET,
function() {
- Y.log('aftersubscriptor reset', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor reset', 'info', 'ITSA-ViewModel');
if (instance._isMicroTemplate) {
// need to re-render because the code might have made items visible/invisible based on their value
instance.render();
@@ -1657,7 +1678,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
EDITABLE+CHANGE,
function() {
- Y.log('aftersubscriptor editableChange', 'info', 'ITSA-ViewModelPanel');
+ Y.log('aftersubscriptor editableChange', 'info', 'ITSA-ViewModel');
var model = instance.get(MODEL);
// if model.toJSONUI exists, then we need to rerender
if (instance.get(TEMPLATE) && model && model.toJSONUI) {
@@ -1671,9 +1692,9 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
'*:change',
function(e) {
- Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
- if ((e.target instanceof Y.Model) && !instance.get(EDITABLE)) {
- instance.render();
+ Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
+ if (e.target instanceof Y.Model) {
+ instance.render(false, true);
}
}
)
@@ -1684,7 +1705,7 @@ ITSAViewModel.prototype._bindUI = function() {
instance.on(
'*:datepickerclick',
function() {
- Y.log('onsubscriptor *:datepickerclick', 'info', 'ITSA-ViewModelPanel');
+ Y.log('onsubscriptor *:datepickerclick', 'info', 'ITSA-ViewModel');
instance.lockView();
instance.once('*:'+FOCUS_NEXT, function() {
instance.unlockView();
@@ -1695,9 +1716,16 @@ ITSAViewModel.prototype._bindUI = function() {
instance.get('partOfMultiView') || eventhandlers.push(
instance.on(
+ '*:'+RESET,
+ Y.bind(instance._disableSaveBtns, instance)
+ )
+ );
+
+ instance.get('partOfMultiView') || eventhandlers.push(
+ instance.on(
['*:'+SUBMIT, '*:'+SAVE, '*:'+LOAD, '*:'+DESTROY],
function(e) {
- Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModelPanel');
+ Y.log('onsubscriptor '+e.type, 'info', 'ITSA-ViewModel');
var promise = e.promise,
model = e.target,
eventType = e.type.split(':')[1],
@@ -1707,43 +1735,58 @@ ITSAViewModel.prototype._bindUI = function() {
destroyWithoutRemove = ((eventType===DESTROY) && options && (options.remove || options[DELETE])),
prevAttrs;
if (!destroyWithoutRemove && (model instanceof Y.Model)) {
- instance._lockedBefore = instance._locked;
- instance.lockView(true);
if ((eventType===SUBMIT) || (eventType===SAVE)) {
prevAttrs = model.getAttrs();
- model.UIToModel();
+ instance.get(EDITABLE) && model.UIToModel();
+ }
+ if ((eventType!==SAVE) || (model.isModified())) {
+ instance._lockedBefore = instance._locked;
+ instance.lockView(true);
+ statusbar || instance._setSpin(eventType, true);
+ (eventType===DESTROY) || promise.then(
+ function() {
+ ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
+ },
+ function() {
+ ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
+ return true; // make promise fulfilled
+ }
+ ).then(
+ function() {
+ statusbar || instance._setSpin(eventType, false);
+ instance._lockedBefore || instance.unlockView();
+ (eventType===SUBMIT) || instance._disableSaveBtns();
+ container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
+ function(itsatabkeymanager) {
+ itsatabkeymanager.focusInitialItem();
+ }
+ );
+ }
+ );
+ }
+ else {
+ (eventType===SAVE) && instance._disableSaveBtns();
}
- statusbar || instance._setSpin(eventType, true);
- (eventType===DESTROY) || promise.then(
- function() {
- ((eventType===LOAD) || (eventType===SUBMIT) || (eventType===SAVE)) && model.setResetAttrs();
- },
- function() {
- ((eventType===SUBMIT) || (eventType===SAVE)) && model.setAttrs(prevAttrs, {fromInternal: true});
- return true; // make promise fulfilled
- }
- ).then(
- function() {
- statusbar || instance._setSpin(eventType, false);
- instance._lockedBefore || instance.unlockView();
- container.pluginReady(ITSATABKEYMANAGER, PLUGIN_TIMEOUT).then(
- function(itsatabkeymanager) {
- itsatabkeymanager.focusInitialItem();
- }
- );
- }
- );
}
}