Merge branch 'master' of github.com:webnotes/wnframework
This commit is contained in:
commit
ffd7dd5599
3 changed files with 21 additions and 4 deletions
|
|
@ -29,20 +29,34 @@ wn.UpdateThisApp = Class.extend({
|
|||
this.wrapper.appframe.add_button(wn._("Get Latest Updates"),
|
||||
function() { me.update_this_app(this); }, "icon-rss");
|
||||
|
||||
this.wrapper.update_output = $('<pre class="well update-output"></pre>')
|
||||
.appendTo(this.body.append("<div></div>"));
|
||||
this.wrapper.update_output.text(wn._('Click on "Get Latest Updates"'));
|
||||
this.wrapper.update_output = $('<pre class="update-output"></pre>')
|
||||
.appendTo(this.body);
|
||||
this.wrapper.update_output.toggle(false);
|
||||
|
||||
this.wrapper.progress_bar = $('<div class="app-update-progress-bar well"></div>')
|
||||
.appendTo(this.body);
|
||||
this.wrapper.progress_bar.text(wn._('Click on "Get Latest Updates"'));
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
update_this_app: function(btn) {
|
||||
var me = this;
|
||||
|
||||
me.wrapper.update_output.toggle(false);
|
||||
me.wrapper.progress_bar.empty().toggle(true);
|
||||
this.wrapper.progress_bar.html('<div class="progress progress-striped active"> \
|
||||
<div class="bar" style="width: 100%;"></div> \
|
||||
</div> \
|
||||
<div>' + wn._("Update is in progress. This may take some time.") + '</div>');
|
||||
|
||||
wn.call({
|
||||
module: "core",
|
||||
page: "update_manager",
|
||||
method: "update_this_app",
|
||||
callback: function(r) {
|
||||
me.wrapper.update_output.toggle(true);
|
||||
me.wrapper.progress_bar.empty().toggle(false);
|
||||
me.wrapper.update_output.text(r.message);
|
||||
},
|
||||
btn: btn,
|
||||
|
|
|
|||
|
|
@ -425,7 +425,9 @@ function DataField() { } DataField.prototype = new Field();
|
|||
DataField.prototype.make_input = function() {
|
||||
var me = this;
|
||||
this.input = $a_input(this.input_area, this.df.fieldtype=='Password' ? 'password' : 'text');
|
||||
|
||||
|
||||
if(this.df.placeholder) $(this.input).attr("placeholder", this.df.placeholder);
|
||||
|
||||
this.get_value= function() {
|
||||
var v = this.input.value;
|
||||
if(this.validate)
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ wn.views.QueryReport = Class.extend({
|
|||
$.each(wn.query_reports[this.report_name].filters || [], function(i, df) {
|
||||
var f = make_field(df, null, $filter_wrapper.get(0), null, 0, 1);
|
||||
f.df.single_select = 1;
|
||||
f.df.placeholder = df.label;
|
||||
f.not_in_form = 1;
|
||||
f.with_label = 0;
|
||||
f.in_filter = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue