Skip to content

Commit cf4a9c6

Browse files
author
Olivier Giulieri
committed
Cleanups.
1 parent 1f99918 commit cf4a9c6

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

js/one-mini.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ Evol.ViewOne.Mini = Evol.ViewOne.extend({
2828
_render: function (h, mode) {
2929
// EDIT and VIEW forms
3030
var opts = this.options,
31-
flds = this.getFields(),
3231
miniUIModel= {
3332
type: 'panel', class:'evol-mini-holder', label: Evol.UI.capitalize(opts.uiModel.entity), width: 100,
34-
elements: flds
33+
elements: this.getFields()
3534
};
3635
this.renderPanel(h, miniUIModel, 'evol-one-mini', mode);
3736
this._renderButtons(h, mode);

js/one-view.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ Evol.ViewOne.View = Evol.ViewOne.extend({
8989
},
9090

9191
_renderButtons: function (h) {
92-
var css=Evol.UI.getSizeCSS(this.options.size);
9392
h.push(Evol.UI.html.clearer,
9493
'<div class="evol-buttons">',
95-
Evol.UI.input.button('cancel', Evol.i18n.Cancel, 'btn-default'+css),
96-
Evol.UI.input.button('edit', Evol.i18n.Edit, 'btn-primary'+css));
97-
h.push('</div>');
94+
Evol.UI.input.button('cancel', Evol.i18n.Cancel, 'btn-default'),
95+
Evol.UI.input.button('edit', Evol.i18n.Edit, 'btn-primary'),
96+
'</div>');
9897
}
9998

10099
});

js/one.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ Evol.ViewOne = Backbone.View.extend({
3838
this.mode= opts.mode || this.options.mode || this.viewName;
3939
this._uTitle=(!_.isUndefined(this.options.titleSelector)) && this.options.titleSelector!=='';
4040
this.hashLov={};
41+
/*
4142
if(this.model){
4243
this.model.on('change', function(model){
4344
that.setModel(model);
4445
});
45-
}
46+
}*/
4647
//TODO set responsive layout
4748
},
4849

@@ -360,7 +361,6 @@ Evol.ViewOne = Backbone.View.extend({
360361

361362
renderPanel: function (h, p, pid, mode, visible) {
362363
var that = this;
363-
364364
if(mode==='wiz'){
365365
var hidden= _.isUndefined(visible)?false:!visible;
366366
h.push('<div data-p-width="100" class="evol-pnl evo-p-wiz" style="width:100%;',hidden?'display:none;':'','">');

js/toolbar.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ Evol.ViewToolbar = Backbone.View.extend({
297297
return this;
298298
},
299299

300+
getView:function(){
301+
return this.curView;
302+
},
303+
300304
getToolbarButtons: function(){
301305
if(!this._toolbarButtons){
302306
var lis=this.$('.evo-toolbar li');
@@ -406,9 +410,9 @@ Evol.ViewToolbar = Backbone.View.extend({
406410
return this;
407411
},*/
408412

409-
setStatus: function(ui){
413+
setStatus: function(msg){
410414
var $e=this.$('.evo-toolbar .evo-tb-status');
411-
$e.html(ui);
415+
$e.html(msg);
412416
},
413417

414418
setData: function(data){

0 commit comments

Comments
 (0)