Permalink
Browse files

gallery-2014.02.26-18-54 ItsAsbreuk gallery-itsaviewmodel

  • Loading branch information...
1 parent cfa267f commit 2c28b9fa10b8738f6db971e1e5d998402a6b7645 @ekashida ekashida committed Feb 26, 2014
Showing with 121 additions and 74 deletions.
  1. +2 −2 build/gallery-itsaviewmodel/gallery-itsaviewmodel-coverage.js
  2. +27 −11 build/gallery-itsaviewmodel/gallery-itsaviewmodel-debug.js
  3. +4 −4 build/gallery-itsaviewmodel/gallery-itsaviewmodel-min.js
  4. +27 −11 build/gallery-itsaviewmodel/gallery-itsaviewmodel.js
  5. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel.js
  6. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ar.js
  7. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bg.js
  8. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_bs.js
  9. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_cs.js
  10. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_da.js
  11. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_de.js
  12. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_en.js
  13. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_es.js
  14. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fa.js
  15. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fi.js
  16. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_fr.js
  17. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_he.js
  18. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hi.js
  19. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hr.js
  20. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_hu.js
  21. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_it.js
  22. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ja.js
  23. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nb.js
  24. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_nl.js
  25. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pl.js
  26. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_pt.js
  27. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_ru.js
  28. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sk.js
  29. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sr.js
  30. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_sv.js
  31. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_uk.js
  32. +1 −1 build/gallery-itsaviewmodel/lang/gallery-itsaviewmodel_zh.js
  33. +26 −9 src/gallery-itsaviewmodel/js/gallery-itsaviewmodel.js
  34. +1 −0 src/gallery-itsaviewmodel/logs/yogi.stderr.log
  35. +6 −4 src/gallery-itsaviewmodel/logs/yogi.stdout.log
  36. +0 −5 src/gallery-itsaviewmodel/meta/gallery-itsaviewmodel.json

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1135,6 +1135,7 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
itsaDateTimePicker = Y.Global.ItsaDateTimePicker,
html = (clear || !model) ? '' : instance._modelRenderer(model),
withfocusmanager;
+
Y.log('render', 'info', 'ITSA-ViewModel');
/*jshint expr:true */
// we should do a cleanup always, BUT
@@ -1146,7 +1147,8 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
// 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();
+ // modelchange && !instance.get('partOfMultiView') && model && model.toJSONUI && model.cleanup();
+ modelchange && model && model.toJSONUI && model.cleanup(container);
@@ -1157,15 +1159,22 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
if (editMode) {
instance._initialEditAttrs = model.getAttrs();
}
- container.cleanup(instance._rendered);
+// STILL there is a bug that we see when using gallery-itsaviewlogin: container.cleanup messes thing up.
+// that is why temporarely commented clenaup:
+
+ container.cleanup(instance._rendered);
+
}
else {
// 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);
+// STILL there is a bug that we see when using gallery-itsaviewlogin: container.cleanup messes thing up.
+// that is why temporarely commented clenaup:
+
+ container.cleanup(false);
}
}
// Append the container element to the DOM if it's not on the page already.
@@ -1635,7 +1644,7 @@ ITSAViewModel.prototype._bindUI = function() {
}
(prevFormModel !== newFormModel) && newFormModel && instance.get(TEMPLATE) && instance._setTemplateRenderer();
/*jshint expr:false */
- instance.render();
+ instance.render(false, prevFormModel);
}
)
);
@@ -1695,8 +1704,8 @@ ITSAViewModel.prototype._bindUI = function() {
'*:change',
function(e) {
Y.log('aftersubscriptor '+e.type, 'info', 'ITSA-ViewModel');
- if (e.target instanceof Y.Model) {
- instance.render(false, true);
+ if ((e.target instanceof Y.Model) && !e.formelement) {
+ instance.render();
}
}
)
@@ -2341,9 +2350,17 @@ ITSAViewModel.prototype[DEF_FN+VALIDATION_ERROR] = function(e) {
// if the node does not have focus yet, setting the focus will lead to tipy-popup.
// when it already has the focus, no tipsy. Thus we need to popup ourselves
// because Y.Tipsy.showTooltip() does not respond to the 'hideon' events, we will call _handleDelegateStart manually:
-/*jshint expr:true */
- (node.getDOMNode()===Y.config.doc.activeElement) ? Y.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget: node}) : node.focus();
-/*jshint expr:false */
+
+ if (node.getDOMNode()===Y.config.doc.activeElement) {
+ Y.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget: node})
+ }
+ else {
+ try {
+ // ALWAYS focus nodes using try/catch to prevent js-error when node not in the dom
+ node.focus();
+ }
+ catch(err) {}
+ }
node.scrollIntoView();
}
};
@@ -2560,7 +2577,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
instance._viewNeedsForm = !instance._contIsForm && !(/<form([^>]*)>/.test(template));
};
-}, 'gallery-2014.01.03-22-50', {
+}, 'gallery-2014.02.26-18-54', {
"requires": [
"yui-base",
"gallery-itsapluginpromise",
@@ -2578,7 +2595,6 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
"event-custom-base",
"oop",
"promise",
- "json",
"pluginhost-base",
"gallery-itsamodulesloadedpromise",
"gallerycss-itsa-base"

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1120,6 +1120,7 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
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
@@ -1130,7 +1131,8 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
// 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();
+ // modelchange && !instance.get('partOfMultiView') && model && model.toJSONUI && model.cleanup();
+ modelchange && model && model.toJSONUI && model.cleanup(container);
@@ -1141,15 +1143,22 @@ ITSAViewModel.prototype.render = function (clear, modelchange) {
if (editMode) {
instance._initialEditAttrs = model.getAttrs();
}
- container.cleanup(instance._rendered);
+// STILL there is a bug that we see when using gallery-itsaviewlogin: container.cleanup messes thing up.
+// that is why temporarely commented clenaup:
+
+ container.cleanup(instance._rendered);
+
}
else {
// 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);
+// STILL there is a bug that we see when using gallery-itsaviewlogin: container.cleanup messes thing up.
+// that is why temporarely commented clenaup:
+
+ container.cleanup(false);
}
}
// Append the container element to the DOM if it's not on the page already.
@@ -1606,7 +1615,7 @@ ITSAViewModel.prototype._bindUI = function() {
}
(prevFormModel !== newFormModel) && newFormModel && instance.get(TEMPLATE) && instance._setTemplateRenderer();
/*jshint expr:false */
- instance.render();
+ instance.render(false, prevFormModel);
}
)
);
@@ -1662,8 +1671,8 @@ ITSAViewModel.prototype._bindUI = function() {
instance.after(
'*:change',
function(e) {
- if (e.target instanceof Y.Model) {
- instance.render(false, true);
+ if ((e.target instanceof Y.Model) && !e.formelement) {
+ instance.render();
}
}
)
@@ -2286,9 +2295,17 @@ ITSAViewModel.prototype[DEF_FN+VALIDATION_ERROR] = function(e) {
// if the node does not have focus yet, setting the focus will lead to tipy-popup.
// when it already has the focus, no tipsy. Thus we need to popup ourselves
// because Y.Tipsy.showTooltip() does not respond to the 'hideon' events, we will call _handleDelegateStart manually:
-/*jshint expr:true */
- (node.getDOMNode()===Y.config.doc.activeElement) ? Y.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget: node}) : node.focus();
-/*jshint expr:false */
+
+ if (node.getDOMNode()===Y.config.doc.activeElement) {
+ Y.ITSAFormElement.tipsyInvalid._handleDelegateStart({currentTarget: node})
+ }
+ else {
+ try {
+ // ALWAYS focus nodes using try/catch to prevent js-error when node not in the dom
+ node.focus();
+ }
+ catch(err) {}
+ }
node.scrollIntoView();
}
};
@@ -2502,7 +2519,7 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
instance._viewNeedsForm = !instance._contIsForm && !(/<form([^>]*)>/.test(template));
};
-}, 'gallery-2014.01.03-22-50', {
+}, 'gallery-2014.02.26-18-54', {
"requires": [
"yui-base",
"gallery-itsapluginpromise",
@@ -2520,7 +2537,6 @@ ITSAViewModel.prototype._setTemplateRenderer = function() {
"event-custom-base",
"oop",
"promise",
- "json",
"pluginhost-base",
"gallery-itsamodulesloadedpromise",
"gallerycss-itsa-base"

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 2c28b9f

Please sign in to comment.