Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表单设计器:选中单元格突出显示,增加remove row按钮 #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webapp/content/form/form-template-input.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
<button class="btn" onclick="doImport()">import</button>
-->
<button class="btn" onclick="xform.addRow()">add row</button>
<button class="btn" onclick="xform.removeRow()">remove row</button>
<button class="btn" onclick="doChangeMode(this)">change to merge mode</button>
<button class="btn" onclick="doMerge()">merge</button>
<button class="btn" onclick="doSplit()">split</button>
Expand Down
4 changes: 2 additions & 2 deletions webapp/widgets/xform/styles/xform.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ table.xf-table {
td.xf-cell {
-moz-user-select: none;
}

/*
td.xf-cell div {
height: 22px;
}

*/
td.xf-cell-top {
border-top: black 1px solid;
}
Expand Down
4 changes: 2 additions & 2 deletions webapp/widgets/xform/xform-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ xf.GridSection.prototype.render = function() {
html += '<tr id="' + rowId + '">'
for (var j = 0; j < this.col; j++) {
var cellId = rowId + '-' + j;
var cellClassName = 'xf-cell-right xf-cell-bottom';
var cellClassName = 'xf-cell xf-cell-right xf-cell-bottom';
if (i == 0) {
cellClassName += ' xf-cell-top';
}
Expand Down Expand Up @@ -627,7 +627,7 @@ xf.GridSection.prototype.addRow = function() {
for (var i = 0; i < this.col; i++) {
var td = document.createElement('td');
td.id = tr.id + '-' + i;
td.className = 'xf-cell-right xf-cell-bottom';
td.className = 'xf-cell xf-cell-right xf-cell-bottom';
if (i == 0) {
td.className += ' xf-cell-left';
}
Expand Down