[gen] Various bugfixes: single-temlplate pod fields, ajax master/slaves and IE10, popup management.
This commit is contained in:
parent
a417db2ad9
commit
ac08d2d795
5 changed files with 26 additions and 31 deletions
|
@ -95,9 +95,6 @@ input.button { border-width: 0 !important; color: #666666; height: 24px;
|
|||
.inputSearch { height: 15px; width: 132px; margin: 3px 3px 2px 3px !important }
|
||||
td.search { padding-top: 8px }
|
||||
.content { padding: 14px 14px 9px 15px; background-color: #f1f1f1 }
|
||||
.grey { display: none; position: absolute; left: 0px; top: 0px; z-index:2;
|
||||
background:grey; opacity:0.5; -moz-opacity:0.5; -khtml-opacity:0.5;
|
||||
filter:alpha(Opacity=50) }
|
||||
.popup { display: none; position: absolute; top: 30%; left: 35%;
|
||||
width: 350px; z-index : 100; background: white; padding: 8px;
|
||||
border: 1px solid grey }
|
||||
|
|
|
@ -42,6 +42,11 @@ function showLoginForm() {
|
|||
}
|
||||
|
||||
function goto(url) { window.location = url }
|
||||
function len(dict) {
|
||||
var res = 0;
|
||||
for (var key in dict) res += 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
function switchLanguage(selectWidget) {
|
||||
var language = selectWidget.options[selectWidget.selectedIndex].value;
|
||||
|
@ -92,7 +97,8 @@ function injectChunk(elem, content){
|
|||
a temporary DOM element. */
|
||||
var temp = document.createElement('div');
|
||||
temp.innerHTML = content;
|
||||
elem.replaceChild(temp.firstChild, elem.firstChild);
|
||||
temp.firstChild.id = elem.id;
|
||||
elem.parentNode.replaceChild(temp.firstChild, elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -550,7 +556,7 @@ function onLinkMany(action, id) {
|
|||
// Get the array semantics
|
||||
var semantics = node['_appy_' + elems[2] + '_sem'];
|
||||
// Show an error messagge if non element is selected.
|
||||
if ((semantics == 'checked') && (Object.keys(statuses).length == 0)) {
|
||||
if ((semantics == 'checked') && (len(statuses) == 0)) {
|
||||
openPopup('alertPopup', no_elem_selected);
|
||||
return;
|
||||
}
|
||||
|
@ -678,24 +684,15 @@ function openPopup(popupId, msg) {
|
|||
// Open the popup
|
||||
var popup = document.getElementById(popupId);
|
||||
// Put it at the right place on the screen
|
||||
var scrollTop = document.body.scrollTop || window.pageYOffset || 0;
|
||||
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || 0;
|
||||
popup.style.top = (scrollTop + 150) + 'px';
|
||||
popup.style.display = "block";
|
||||
// Show the greyed zone
|
||||
var greyed = document.getElementById('grey');
|
||||
greyed.style.top = scrollTop + 'px';
|
||||
greyed.style.display = "block";
|
||||
greyed.style.height = document.body.clientHeight;
|
||||
greyed.style.width = document.body.clientWidth;
|
||||
popup.style.display = 'block';
|
||||
}
|
||||
|
||||
function closePopup(popupId) {
|
||||
// Close the popup
|
||||
var popup = document.getElementById(popupId);
|
||||
popup.style.display = "none";
|
||||
// Hide the greyed zone
|
||||
var greyed = document.getElementById('grey');
|
||||
greyed.style.display = "none";
|
||||
popup.style.display = 'none';
|
||||
}
|
||||
|
||||
// Function triggered when an action needs to be confirmed by the user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue