mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/IZYIM-Prototype.git
synced 2026-08-19 04:33:55 +00:00
importer
This commit is contained in:
@@ -1343,6 +1343,7 @@ License: You must have a valid license purchased only from themeforest(the above
|
||||
<script src="../assets/layouts/global/scripts/quick-nav.min.js" type="text/javascript"></script>
|
||||
<!-- END THEME LAYOUT SCRIPTS -->
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
@@ -1369,6 +1370,74 @@ License: You must have a valid license purchased only from themeforest(the above
|
||||
document.getElementById("with_content").style.display = "";
|
||||
}
|
||||
</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>
|
||||
Reference in New Issue
Block a user