fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change field length.
[redakcja.git]
/
src
/
redakcja
/
static
/
js
/
wiki
/
base.js
diff --git
a/src/redakcja/static/js/wiki/base.js
b/src/redakcja/static/js/wiki/base.js
index
d914168
..
ad0ca83
100644
(file)
--- a/
src/redakcja/static/js/wiki/base.js
+++ b/
src/redakcja/static/js/wiki/base.js
@@
-196,8
+196,7
@@
$elem.removeClass('row-stub');
params.container.append($elem);
$elem.removeClass('row-stub');
params.container.append($elem);
- $('*[data-stub-value]', $elem).each(function() {
- var $this = $(this);
+ var populate = function($this) {
var field = $this.attr('data-stub-value');
var value = params.data[field];
var field = $this.attr('data-stub-value');
var value = params.data[field];
@@
-215,7
+214,9
@@
$this.removeAttr('data-stub-target');
$this.removeAttr('data-stub-value');
}
$this.removeAttr('data-stub-target');
$this.removeAttr('data-stub-value');
}
- });
+ }
+ if ($elem.attr('data-stub-value')) populate($elem);
+ $('*[data-stub-value]', $elem).each(function() {populate($(this))});
$elem.show();
return $elem;
$elem.show();
return $elem;
@@
-307,7
+308,7
@@
var span = $("*[data-ui-error-for='"+field_name+"']", this.$elem);
if(!span.length) {
var span = $("*[data-ui-error-for='"+field_name+"']", this.$elem);
if(!span.length) {
- unassigned.push(
field_name
);
+ unassigned.push(
errors[field_name]
);
continue;
}
continue;
}
@@
-315,7
+316,8
@@
}
if(unassigned.length > 0)
}
if(unassigned.length > 0)
- global.text( global.text() + 'W formularzu wystąpiły błędy');
+ global.text(
+ global.text() + 'Wystąpił błąd: ' + unassigned.join(', '));
}
}
}
}
@@
-344,6
+346,7
@@
$.ajax("/editor/editor-user-area/", {
success: function(d) {
$("#user-area")[0].innerHTML = d;
$.ajax("/editor/editor-user-area/", {
success: function(d) {
$("#user-area")[0].innerHTML = d;
+ $('#history-view-editor').toggleClass('can-approve', $('#user-area #pubmark_dialog').length > 0);
}
});
}, false);
}
});
}, false);