Skip to content

Commit

Permalink
Few small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitmalina committed Sep 12, 2015
1 parent 861b40e commit f25b7a3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/less/src/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
// --- It is outside of the form on purpose

.w2ui-group-title {
padding: 5px 2px;
padding: 5px 2px;
color: #8D96A2;
text-shadow: 1px 1px 2px rgb(253, 253, 253);
font-size: 120%;
Expand Down
10 changes: 5 additions & 5 deletions src/less/w2ui.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// ******************************************
// ---- Common, Overlay, Bubble ----

@input-border: 1px solid #bbb;
@input-border: 1px solid #cacaca;
@input-color: black;
@input-background-color: white;
@input-focus-outline-color: #72B2FF;
Expand All @@ -58,16 +58,16 @@
@form-border: 1px solid #c0c0c0;
@form-border-radius: 3px;
@form-color: black;
@form-background-color: #F5F6F7;
@form-background-color: #F2F2F2;
@form-header-color: #444;
@form-header-linear-gradient-start: #DAE6F3;
@form-header-linear-gradient-end: #C2D5ED;
@form-header-border-bottom: 1px solid #99bbe8;
@form-tabs-background-color: #fafafa;
@form-page-border: 1px solid inherit;
@form-page-background-color: inherit;
@form-group-background-color: #EBECEF;
@form-group-border: 1px solid #CEDCEA;
@form-group-background-color: #F9F9F9;
@form-group-border: 1px solid #DCDCDC;
@form-required-color: red;
@form-buttons-border-top: 1px solid #d5d8d8;
@form-buttons-border-bottom: 0px solid #d5d8d8;
Expand Down Expand Up @@ -139,7 +139,7 @@
// ---- Layout ----

@layout-color: inherit;
@layout-background-color: #F5F6F7;
@layout-background-color: #F2F2F2;
@layout-title-linear-gradient-start: #DAE6F3;
@layout-title-linear-gradient-end: #C2D5ED;
@layout-title-border: 1px solid #B9CEE9;
Expand Down
2 changes: 1 addition & 1 deletion src/w2form.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@
if (act["class"]) info['class'] = act['class'];
} else {
info.caption = a;
if (['save', 'update', 'create'].indexOf(a.toLowerCase()) != -1) info['class'] = 'w2ui-btn-green'; else info['class'] = '';
if (['save', 'update', 'create'].indexOf(a.toLowerCase()) != -1) info['class'] = 'w2ui-btn-blue'; else info['class'] = '';
}
buttons += '\n <button name="'+ a +'" class="w2ui-btn '+ info['class'] +'" style="'+ info.style +'">'+
w2utils.lang(info.caption) +'</button>';
Expand Down
26 changes: 13 additions & 13 deletions src/w2grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -3745,16 +3745,16 @@
for (var index = this.last.range_start - 1; index <= this.last.range_end - 1; index++) {
if (index < 0) continue;
var rec = this.records[index];
for (var col_index = 0; col_index < this.columns.length; col_index++) {
var cell = $(this.box).find('#grid_'+ this.name + '_data_'+ index +'_'+ col_index);
cell.replaceWith(this.getCellHTML(index, col_index, false));
for (var column = 0; column < this.columns.length; column++) {
var cell = $(this.box).find('#grid_'+ this.name + '_data_'+ index +'_'+ column);
cell.replaceWith(this.getCellHTML(index, column, false));
// assign style
if (rec.style != null && !$.isEmptyObject(rec.style)) {
if (typeof rec.style == 'string') {
$(this.box).find('#grid_'+ this.name +'_rec_'+ w2utils.escapeId(rec.recid)).attr('style', rec.style);
}
if ($.isPlainObject(rec.style) && typeof rec.style[col_index] == 'string') {
cell.attr('style', rec.style[col_index]);
if ($.isPlainObject(rec.style) && typeof rec.style[column] == 'string') {
cell.attr('style', rec.style[column]);
}
} else {
cell.attr('style', '');
Expand All @@ -3763,23 +3763,23 @@
}
} else {
for (var i = 0; i < cells.length; i++) {
var index = cells[i].index;
var col_index = cells[i].col_index;
var index = cells[i].index;
var column = cells[i].column;
if (index < 0) continue;
if (index == null || col_index == null) {
console.log('ERROR: Wrong argument for grid.update(cells), cells should be [{ index: X, col_index: Y }, ...]');
if (index == null || column == null) {
console.log('ERROR: Wrong argument for grid.update(cells), cells should be [{ index: X, column: Y }, ...]');
continue;
}
var rec = this.records[index];
var cell = $(this.box).find('#grid_'+ this.name + '_data_'+ index +'_'+ col_index);
cell.replaceWith(this.getCellHTML(index, col_index, false));
var cell = $(this.box).find('#grid_'+ this.name + '_data_'+ index +'_'+ column);
cell.replaceWith(this.getCellHTML(index, column, false));
// assign style
if (rec.style != null && !$.isEmptyObject(rec.style)) {
if (typeof rec.style == 'string') {
$(this.box).find('#grid_'+ this.name +'_rec_'+ w2utils.escapeId(rec.recid)).attr('style', rec.style);
}
if ($.isPlainObject(rec.style) && typeof rec.style[col_index] == 'string') {
cell.attr('style', rec.style[col_index]);
if ($.isPlainObject(rec.style) && typeof rec.style[column] == 'string') {
cell.attr('style', rec.style[column]);
}
} else {
cell.attr('style', '');
Expand Down
2 changes: 1 addition & 1 deletion test/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@

<div class="w2ui-buttons">
<button class="w2ui-btn" name="reset">Reset</button>
<button class="w2ui-btn w2ui-btn-green" name="save" id="ssl-submit">Save</button>
<button class="w2ui-btn w2ui-btn-blue" name="save" id="ssl-submit">Save</button>
</div>
</div>
</body>
Expand Down

0 comments on commit f25b7a3

Please sign in to comment.