diff --git a/admin/admin_footer.php b/admin/admin_footer.php index b2007a7..3952097 100644 --- a/admin/admin_footer.php +++ b/admin/admin_footer.php @@ -18,6 +18,6 @@ */ $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32); -echo "
\n" . "
\n" . " XOOPS\n" . "
\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '
'; +echo "
\n" . "
\n" . " XOOPS\n" . "
\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '
'; xoops_cp_footer(); diff --git a/admin/funcs.js b/admin/funcs.js index 7a8feee..f1b5c20 100644 --- a/admin/funcs.js +++ b/admin/funcs.js @@ -1,96 +1,96 @@ function addSelectedItemsToParent() { - self.opener.addToParentList(window.document.forms[0].destList); - window.close(); + self.opener.addToParentList(window.document.forms[0].destList); + window.close(); } // Fill the selcted item list with the items already present in parent. function fillInitialDestList() { - var destList = window.document.forms[0].destList; - var srcList = self.opener.window.document.forms[0].elements['moderators[]']; - for (var count = destList.options.length - 1; count >= 0; count--) { - destList.options[count] = null; - } - for(var i = 0; i < srcList.options.length; i++) { - if (srcList.options[i] != null) - destList.options[i] = new Option(srcList.options[i].text); - } + var destList = window.document.forms[0].destList; + var srcList = self.opener.window.document.forms[0].elements['moderators[]']; + for (var count = destList.options.length - 1; count >= 0; count--) { + destList.options[count] = null; + } + for (var i = 0; i < srcList.options.length; i++) { + if (srcList.options[i] != null) + destList.options[i] = new Option(srcList.options[i].text); + } } // Add the selected items from the source to destination list function addSrcToDestList() { - destList = window.document.forms[0].destList; - srcList = window.document.forms[0].srcList; - var len = destList.length; - for(var i = 0; i < srcList.length; i++) { - if ((srcList.options[i] != null) && (srcList.options[i].selected)) { - //Check if this value already exist in the destList or not - //if not then add it otherwise do not add it. - var found = false; - for(var count = 0; count < len; count++) { - if (destList.options[count] != null) { - if (srcList.options[i].text == destList.options[count].text) { - found = true; - break; - } - } - } - if (found != true) { - destList.options[len] = new Option(srcList.options[i].text); - len++; - } - } - } + destList = window.document.forms[0].destList; + srcList = window.document.forms[0].srcList; + var len = destList.length; + for (var i = 0; i < srcList.length; i++) { + if ((srcList.options[i] != null) && (srcList.options[i].selected)) { + //Check if this value already exist in the destList or not + //if not then add it otherwise do not add it. + var found = false; + for (var count = 0; count < len; count++) { + if (destList.options[count] != null) { + if (srcList.options[i].text == destList.options[count].text) { + found = true; + break; + } + } + } + if (found != true) { + destList.options[len] = new Option(srcList.options[i].text); + len++; + } + } + } } // Deletes from the destination list. function deleteFromDestList() { - var destList = window.document.forms[0].destList; - var len = destList.options.length; - for(var i = (len-1); i >= 0; i--) { - if ((destList.options[i] != null) && (destList.options[i].selected == true)) { - destList.options[i] = null; - } - } + var destList = window.document.forms[0].destList; + var len = destList.options.length; + for (var i = (len - 1); i >= 0; i--) { + if ((destList.options[i] != null) && (destList.options[i].selected == true)) { + destList.options[i] = null; + } + } } function small_window(myurl, w, h) { - // La ventana se llama "Add_from_Src_to_Dest" - var newWindow; - LeftPosition = (screen.width)? (screen.width-w)/2 : 0; - TopPosition = (screen.height)? (screen.height-h)/2 : 0; - newWindow = window.open(myurl, "Add_from_Src_to_Dest", 'left='+LeftPosition+',top='+TopPosition+',width='+w+', height='+h+',scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no'); + // La ventana se llama "Add_from_Src_to_Dest" + var newWindow; + LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0; + TopPosition = (screen.height) ? (screen.height - h) / 2 : 0; + newWindow = window.open(myurl, "Add_from_Src_to_Dest", 'left=' + LeftPosition + ',top=' + TopPosition + ',width=' + w + ', height=' + h + ',scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no'); } // Adds the list of selected items selected in the child -// window to its list. It is called by child window to do so. +// window to its list. It is called by child window to do so. function addToParentList(sourceList) { - destinationList = window.document.forms[0].elements['moderators[]']; - for(var count = destinationList.options.length - 1; count >= 0; count--) { - destinationList.options[count] = null; - } - for(var i = 0; i < sourceList.options.length; i++) { - if (sourceList.options[i] != null) - destinationList.options[i] = new Option(sourceList.options[i].text, sourceList.options[i].value ); - } + destinationList = window.document.forms[0].elements['moderators[]']; + for (var count = destinationList.options.length - 1; count >= 0; count--) { + destinationList.options[count] = null; + } + for (var i = 0; i < sourceList.options.length; i++) { + if (sourceList.options[i] != null) + destinationList.options[i] = new Option(sourceList.options[i].text, sourceList.options[i].value); + } } -// Marks all the items as selected for the submit button. +// Marks all the items as selected for the submit button. function selectList(sourceList) { - sourceList = window.document.forms[0].elements['moderators[]']; - for(var i = 0; i < sourceList.options.length; i++) { - if (sourceList.options[i] != null) - sourceList.options[i].selected = true; - } - return true; + sourceList = window.document.forms[0].elements['moderators[]']; + for (var i = 0; i < sourceList.options.length; i++) { + if (sourceList.options[i] != null) + sourceList.options[i].selected = true; + } + return true; } // Deletes the selected items of supplied list. function deleteSelectedItemsFromList(sourceList) { - var maxCnt = sourceList.options.length; - for(var i = maxCnt - 1; i >= 0; i--) { - if ((sourceList.options[i] != null) && (sourceList.options[i].selected == true)) { - sourceList.options[i] = null; - } - } + var maxCnt = sourceList.options.length; + for (var i = maxCnt - 1; i >= 0; i--) { + if ((sourceList.options[i] != null) && (sourceList.options[i].selected == true)) { + sourceList.options[i] = null; + } + } } diff --git a/admin/index.php b/admin/index.php index e155bb8..87559ec 100644 --- a/admin/index.php +++ b/admin/index.php @@ -22,7 +22,7 @@ xoops_cp_header(); -$adminObject = \Xmf\Module\Admin::getInstance(); +$adminObject = \Xmf\Module\Admin::getInstance(); //---------------------- diff --git a/assets/css/smartfaq.css b/assets/css/smartfaq.css index 4e9b907..c57664c 100644 --- a/assets/css/smartfaq.css +++ b/assets/css/smartfaq.css @@ -1,5 +1,5 @@ /** -* +* * Module: SmartFAQ * Author: The SmartFactory * Licence: GNU diff --git a/assets/js/overlib/overlib_hideform.js b/assets/js/overlib/overlib_hideform.js index ef6768f..d1839aa 100644 --- a/assets/js/overlib/overlib_hideform.js +++ b/assets/js/overlib/overlib_hideform.js @@ -16,90 +16,90 @@ if (typeof olInfo == 'undefined' || olInfo.simpleversion < 400) alert('overLIB 4 // Function which generates the popup with an IFRAME shim function generatePopUp(content) { - if(!olIe4||olOp||!olIe55||(typeof o3_shadow != 'undefined' && o3_shadow)||(typeof o3_bubble != 'undefined' && o3_bubble)) return; + if (!olIe4 || olOp || !olIe55 || (typeof o3_shadow != 'undefined' && o3_shadow) || (typeof o3_bubble != 'undefined' && o3_bubble)) return; - var wd,ht,txt, zIdx = 0; + var wd, ht, txt, zIdx = 0; - wd = parseInt(o3_width); - ht = over.offsetHeight; - txt = bckDropSrc(wd,ht,zIdx++); - txt += '
' + content + '
'; - layerWrite(txt); + wd = parseInt(o3_width); + ht = over.offsetHeight; + txt = bckDropSrc(wd, ht, zIdx++); + txt += '
' + content + '
'; + layerWrite(txt); } // Code for the IFRAME which is used in other places function bckDropSrc(width, height, Z) { - return ''; + return ''; } // Hides SELECT boxes that will be under the popup // Checking Gecko version number to try to include other browsers based on the Gecko engine function hideSelectBox() { - if(olNs4 || olOp || olIe55) return; - var px, py, pw, ph, sx, sw, sy, sh, selEl, v; - - if(olIe4) v = 0; - else { - v = navigator.userAgent.match(/Gecko\/(\d{8})/i); - if(!v) return; // return if no string match - v = parseInt(v[1]); - } - - if (v < 20030624) { // versions less than June 24, 2003 were earlier Netscape browsers - px = parseInt(over.style.left); - py = parseInt(over.style.top); - pw = o3_width; - ph = (o3_aboveheight? parseInt(o3_aboveheight) : over.offsetHeight); - selEl = (olIe4)? o3_frame.document.all.tags("SELECT") : o3_frame.document.getElementsByTagName("SELECT"); - for (var i=0; i (sx+sw) || (py+ph) < sy || py > (sy+sh)) continue; - selEl[i].isHidden = 1; - selEl[i].style.visibility = 'hidden'; - } - } + if (olNs4 || olOp || olIe55) return; + var px, py, pw, ph, sx, sw, sy, sh, selEl, v; + + if (olIe4) v = 0; + else { + v = navigator.userAgent.match(/Gecko\/(\d{8})/i); + if (!v) return; // return if no string match + v = parseInt(v[1]); + } + + if (v < 20030624) { // versions less than June 24, 2003 were earlier Netscape browsers + px = parseInt(over.style.left); + py = parseInt(over.style.top); + pw = o3_width; + ph = (o3_aboveheight ? parseInt(o3_aboveheight) : over.offsetHeight); + selEl = (olIe4) ? o3_frame.document.all.tags("SELECT") : o3_frame.document.getElementsByTagName("SELECT"); + for (var i = 0; i < selEl.length; i++) { + if (!olIe4 && selEl[i].size < 2) continue; // Not IE and SELECT size is 1 or not specified + sx = pageLocation(selEl[i], 'Left'); + sy = pageLocation(selEl[i], 'Top'); + sw = selEl[i].offsetWidth; + sh = selEl[i].offsetHeight; + if ((px + pw) < sx || px > (sx + sw) || (py + ph) < sy || py > (sy + sh)) continue; + selEl[i].isHidden = 1; + selEl[i].style.visibility = 'hidden'; + } + } } // Shows previously hidden SELECT Boxes function showSelectBox() { - if(olNs4 || olOp || olIe55) return; - var selEl, v; - - if(olIe4) v = 0; - else { - v = navigator.userAgent.match(/Gecko\/(\d{8})/i); - if(!v) return; - v = parseInt(v[1]); - } - - if(v < 20030624) { - selEl = (olIe4)? o3_frame.document.all.tags("SELECT") : o3_frame.document.getElementsByTagName("SELECT"); - for (var i=0; i\n\n'); - } - - f = capExtent.onmousemove.toString().match(/function[ ]+(\w*)\(/); - if (f&&f[1] != 'annoymous') capExtent.onmousemove = olMouseMove; + var MMStr = olMouseMove.toString(); + var strRe = /(if\s*\(o3_allowmove\s*==\s*1.*\)\s*)/; + var f = MMStr.match(strRe); + + if (f) { + var ls = MMStr.search(strRe); + ls += f[1].length; + var le = MMStr.substring(ls).search(/[;|}]\n/); + MMStr = MMStr.substring(0, ls) + ' { runHook("placeLayer",FREPLACE); if(olHideForm) hideSelectBox(); ' + MMStr.substring(ls + (le != -1 ? le + 3 : 0)); + document.writeln('