This commit is contained in:
Nur Nadiah Nabilah Binti Hashinordin
2017-08-21 11:43:35 +08:00
parent 42c9f8a366
commit 70f976643a
+104 -28
View File
@@ -74,11 +74,11 @@ License: You must have a valid license purchased only from themeforest(the above
margin-right: 90px;
}
.modal-content {
width: 930px;
width: 1100px;
position: center;
}
.modal-dialog {
width: 900px;
width: 1000px;
}
.table {
color: black
@@ -326,21 +326,30 @@ License: You must have a valid license purchased only from themeforest(the above
<div class="form-group">
<label for="single" class="col-md-4 control-label">Order No</label>
<div class="col-md-4">
<select id="single" styel="center" class="form-control select2 select2-hidden-accessible" tabindex="-1" aria-hidden="true">
<select id="single" style="center" class="form-control select2 select2-hidden-accessible" tabindex="-1" aria-hidden="true">
<option></option>
<optgroup label="Order No">
<option value="AK">ABCD/00012/00012</option>
<option value="CA">CIEF/00012/00012</option>
<option value="NV">CIEF/00012/00012</option>
<option value="OR">CIEF/00012/00012</option>
<option value="WA">CIEF/00012/00012</option>
<option value="CA">WORD/00012/00012</option>
<option value="NV">WORD/00012/00012</option>
<option value="OR">WORD/00012/00012</option>
<option value="WA">WORD/00012/00012</option>
<option value="000" disabled="disabled">00012</option>
<option value="001">00114</option>
<option value="002">00216</option>
<option value="004">00418</option>
<option value="006">00624</option>
<option value="183">18332</option>
<option value="187">18742</option>
<option value="197">19745</option>
<option value="256">25654</option>
<option value="287">28782</option>
<option value="348">34829</option>
<option value="368">36894</option>
<option value="380">38090</option>
<option value="426">42679</option>
<option value="448">44895</option>
<option value="468">46894</option>
<option value="489">48939</option>
<option value="578">57839</option>
</optgroup>
</select>
</div>
</div>
</div>
<span class="select2 select2-container select2-container--bootstrap select2-container--above select2-container--focus" dir="ltr">
@@ -935,7 +944,7 @@ License: You must have a valid license purchased only from themeforest(the above
<div class="portlet light bordered">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject bold font-purple-plum uppercase"> PACKING LIST - 00012 </span>
<span class="caption-subject bold font-purple-plum uppercase"> DEPARTURE WAREHOUSE RECEIVE NOTE - 00012 </span>
</div>
</div>
<div class="portlet-body">
@@ -954,13 +963,13 @@ License: You must have a valid license purchased only from themeforest(the above
</thead>
<tbody>
<tr>
<td>1</td>
<td>4</td>
<td>1</td>
<td>4</td>
<td>40x40x40</td>
<td>10 kg</td>
<td>4</td>
<td>42x42x42</td>
<td>9.8 kg</td>
<td>10kg</td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">4</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">40x40x40</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">9.8kg</span></td>
<td>
<div>
<span class="fileinput-new"></span>
@@ -973,10 +982,10 @@ License: You must have a valid license purchased only from themeforest(the above
<td>2</td>
<td>4</td>
<td>40x40x40</td>
<td>10 kg</td>
<td>4</td>
<td>42x42x42</td>
<td>9.8 kg</td>
<td>10kg</td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">4</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">40x40x40</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">9.8kg</span></td>
<td>
<div>
<span class="fileinput-new"></span>
@@ -989,10 +998,10 @@ License: You must have a valid license purchased only from themeforest(the above
<td>3</td>
<td>4</td>
<td>40x40x40</td>
<td>10 kg</td>
<td>4</td>
<td>42x42x42</td>
<td>9.8 kg</td>
<td>10kg</td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">4</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">40x40x40</span></td>
<td data-jstree='{ "type" : "file" }' onclick="show_content();" ><span class="editInPlace">9.8kg</span></td>
<td>
<div>
<span class="fileinput-new"></span>
@@ -1098,6 +1107,73 @@ License: You must have a valid license purchased only from themeforest(the above
});
})
</script>
<script type="text/javascript">
function show_content(){
//alert('hoooo');
document.getElementById("without_content").style.display = "none";
document.getElementById("with_content").style.display = "";
var elements = getElementsByClassName('editInPlace', '*', document);
for (var i = 0; i < elements.length; i++) {
elements[i].ondblclick = function() {
this.setAttribute('oldText', this.innerHTML); // not actually required. I use this just in case you want to cancel and set the original text back.
var textBox = document.createElement('INPUT');
textBox.setAttribute('type', 'text');
textBox.value = this.innerHTML;
textBox.onblur = function() {
var newValue = this.value;
this.parentNode.innerHTML = newValue;
//alert("Your new value: \n\n" + newValue);
}
this.innerHTML = '';
this.appendChild(textBox);
}
}(i);
}
window.onload = function() {
var elements = getElementsByClassName('editInPlace', '*', document);
for (var i = 0; i < elements.length; i++) {
elements[i].ondblclick = function() {
this.setAttribute('oldText', this.innerHTML); // not actually required. I use this just in case you want to cancel and set the original text back.
var textBox = document.createElement('INPUT');
textBox.setAttribute('type', 'text');
textBox.value = this.innerHTML;
textBox.onblur = function() {
var newValue = this.value;
this.parentNode.innerHTML = newValue;
//alert("Your new value: \n\n" + newValue);
}
this.innerHTML = '';
this.appendChild(textBox);
}
}(i);
}
function getElementsByClassName(className, tag, elm) {
var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
var tag = tag || "*";
var elm = elm || document;
var elements = (tag == "*" && elm.all) ? elm.all : elm.getElementsByTagName(tag);
var returnElements = [];
var current;
var length = elements.length;
for (var i = 0; i < length; i++) {
current = elements[i];
if (testClass.test(current.className)) {
returnElements.push(current);
}
}
return returnElements;
}
$('[data-toggle="popover"]').popover({trigger: 'focus'})
</script>
</body>
</html>