Selaa lähdekoodia

[ui] minor fixes

version-14
Rushabh Mehta 11 vuotta sitten
vanhempi
commit
d4589ab108
7 muutettua tiedostoa jossa 26 lisäystä ja 9 poistoa
  1. +2
    -2
      core/doctype/workflow/workflow.js
  2. +12
    -0
      public/css/common.css
  3. +1
    -1
      public/js/wn/form/toolbar.js
  4. +2
    -2
      public/js/wn/form/workflow.js
  5. +5
    -0
      public/js/wn/model/model.js
  6. +3
    -2
      public/js/wn/ui/appframe.js
  7. +1
    -2
      public/js/wn/views/communication.js

+ 2
- 2
core/doctype/workflow/workflow.js Näytä tiedosto

@@ -13,7 +13,7 @@ wn.core.Workflow = wn.ui.form.Controller.extend({
},
load_document_type: function(doc) {
var me = this;
if(!locals.DocType[doc.document_type]) {
if(doc.document_type && !locals.DocType[doc.document_type]) {
wn.model.with_doctype(doc.document_type, function() {
me.update_field_options();
});
@@ -25,7 +25,7 @@ wn.core.Workflow = wn.ui.form.Controller.extend({
fieldtype: ["not in", wn.model.no_value_type]
}),
function(d) { return d.fieldname; });
wn.meta.get_docfield("Workflow Document State", "update_field").options
wn.meta.get_docfield("Workflow Document State", "update_field", this.frm.doc.name).options
= [""].concat(fields);
}
});


+ 12
- 0
public/css/common.css Näytä tiedosto

@@ -372,6 +372,18 @@ div#freeze {
background-color: #e74c3c;
}

.comm-header {
font-weight: bold;
height: 20px;
overflow: hidden;
}

.comm-header > div {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

/* alert */




+ 1
- 1
public/js/wn/form/toolbar.js Näytä tiedosto

@@ -11,6 +11,7 @@ wn.ui.form.Toolbar = Class.extend({
this.appframe.set_views_for(this.frm.meta.name, "form");
},
make: function() {
this.appframe.set_title_right(); // clear
this.set_title();
this.show_title_as_dirty();

@@ -43,7 +44,6 @@ wn.ui.form.Toolbar = Class.extend({
this.appframe.set_title(title + this.get_lock_status(), wn._(this.frm.docname));
this.appframe.set_title_left('<i class="icon-angle-left"></i> ' + wn._(this.frm.doctype),
function() { wn.set_route("List", me.frm.doctype); });
this.appframe.set_title_right();
},
show_infobar: function() {
/* docs:


+ 2
- 2
public/js/wn/form/workflow.js Näytä tiedosto

@@ -24,7 +24,7 @@ wn.ui.form.States = Class.extend({
.empty()
.removeClass("hide");
this.workflow_button = $('<button class="btn btn-default dropdown-toggle">\
this.workflow_button = $('<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">\
<i class="icon-small"></i> <span class="state-text"></span>\
<span class="caret"></span></button>')
.appendTo(this.parent).dropdown();
@@ -178,7 +178,7 @@ wn.ui.form.States = Class.extend({
}
// hide dropdown
$(this).parents(".dropdown-menu:first").prev().dropdown('toggle');
me.workflow_button.dropdown('toggle');
return false;
})


+ 5
- 0
public/js/wn/model/model.js Näytä tiedosto

@@ -57,6 +57,11 @@ $.extend(wn.model, {
cached_timestamp: cached_timestamp
},
callback: function(r) {
if(r.exc) {
wn.msgprint(wn._("Unable to load") + ": " + wn._(doctype));
throw "No doctype";
return;
}
if(r.message=="use_cache") {
wn.model.sync(cached_doclist);
} else {


+ 3
- 2
public/js/wn/ui/appframe.js Näytä tiedosto

@@ -59,7 +59,7 @@ wn.ui.AppFrame = Class.extend({
this.title_right = $("<a>")
.html((icon ? '<i class="'+icon+'"></i> ' : "") + txt)
.click(click)
.appendTo($right);
.prependTo($right);
return this.title_right;
} else {
$right.empty();
@@ -328,7 +328,8 @@ wn.ui.make_app_page = function(opts) {
</div>\
</div>\
<div class="appframe container">\
<div class="workflow-button-area btn-group pull-right hide" style="margin-top: 9px;"></div>\
<div class="appframe-timestamp hide"></div>\
<div class="workflow-button-area btn-group pull-right hide"></div>\
</div>\
<div class="appframe-footer hide"></div>').appendTo($wrapper);



+ 1
- 2
public/js/wn/views/communication.js Näytä tiedosto

@@ -97,8 +97,7 @@ wn.views.CommunicationList = Class.extend({
"SMS": "icon-mobile-phone",
}[doc.communication_medium] || "icon-envelope";
var comm = $(repl('<div class="list-group-item">\
<div class="comm-header row" title="'+wn._('Click to Expand / Collapse')+'"\
style="font-weight: bold; height: 20px; overflow: hidden;">\
<div class="comm-header row" title="'+wn._('Click to Expand / Collapse')+'">\
<div class="col-sm-3"><i class="%(icon)s"></i> %(_sender)s</div>\
<div class="col-sm-6">%(subject)s</div>\
<div class="col-sm-3 text-right">%(when)s</div>\


Ladataan…
Peruuta
Tallenna