Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Aug 4, 2017
1 parent 94b8901 commit 0d7d1bc
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion admin/admin_footer.php
Expand Up @@ -18,6 +18,6 @@
*/

$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';

xoops_cp_footer();
134 changes: 67 additions & 67 deletions 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;
}
}
}
2 changes: 1 addition & 1 deletion admin/index.php
Expand Up @@ -22,7 +22,7 @@

xoops_cp_header();

$adminObject = \Xmf\Module\Admin::getInstance();
$adminObject = \Xmf\Module\Admin::getInstance();

//----------------------

Expand Down
2 changes: 1 addition & 1 deletion assets/css/smartfaq.css
@@ -1,5 +1,5 @@
/**
*
*
* Module: SmartFAQ
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
Expand Down
158 changes: 79 additions & 79 deletions assets/js/overlib/overlib_hideform.js
Expand Up @@ -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 += '<div style="position: absolute; top: 0; left: 0; width: '+ wd+'px; z-index: ' + zIdx + ';">' + content + '</div>';
layerWrite(txt);
wd = parseInt(o3_width);
ht = over.offsetHeight;
txt = bckDropSrc(wd, ht, zIdx++);
txt += '<div style="position: absolute; top: 0; left: 0; width: ' + wd + 'px; z-index: ' + zIdx + ';">' + content + '</div>';
layerWrite(txt);
}

// Code for the IFRAME which is used in other places
function bckDropSrc(width, height, Z) {
return '<iframe frameborder="0" scrolling="no" src="" width="' + width + '" height="' + height + '" style="z-index: ' + Z + '; filter: Beta(Style=0,Opacity=0);"></iframe>';
return '<iframe frameborder="0" scrolling="no" src="" width="' + width + '" height="' + height + '" style="z-index: ' + Z + '; filter: Beta(Style=0,Opacity=0);"></iframe>';
}

// 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<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';
}
}
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<selEl.length; i++) {
if(typeof selEl[i].isHidden != 'undefined' && selEl[i].isHidden) {
selEl[i].isHidden = 0;
selEl[i].style.visibility = 'visible';
}
}
}
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 < selEl.length; i++) {
if (typeof selEl[i].isHidden != 'undefined' && selEl[i].isHidden) {
selEl[i].isHidden = 0;
selEl[i].style.visibility = 'visible';
}
}
}
}

// function gets the total offset properties of an element
// this same function occurs in overlib_mark.js.
function pageLocation(o,t){
var x = 0
function pageLocation(o, t) {
var x = 0

while(o.offsetParent){
x += o['offset'+t]
o = o.offsetParent
}
while (o.offsetParent) {
x += o['offset' + t]
o = o.offsetParent
}

x += o['offset'+t]
x += o['offset' + t]

return x
return x
}

// reset mouse move routine for NS7 but not NS7.1,Opera, or IE5.5+
Expand All @@ -108,26 +108,26 @@ function pageLocation(o,t){
// Modify mouse move routine while loading so that hideSelectBox()
// can be called from the correct location
if (!(olNs4 || olOp || olIe55 || navigator.userAgent.indexOf('Netscape6') != -1)) {
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('<script type="text/javascript">\n<!--\n' + MMStr + '\n//-->\n</' + 'script>');
}

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('<script type="text/javascript">\n<!--\n' + MMStr + '\n//-->\n</' + 'script>');
}

f = capExtent.onmousemove.toString().match(/function[ ]+(\w*)\(/);
if (f && f[1] != 'annoymous') capExtent.onmousemove = olMouseMove;
}


////////
// PLUGIN REGISTRATIONS
////////
registerHook("createPopup",generatePopUp,FAFTER);
registerHook("hideObject",showSelectBox,FAFTER);
olHideForm=1;
registerHook("createPopup", generatePopUp, FAFTER);
registerHook("hideObject", showSelectBox, FAFTER);
olHideForm = 1;
2 changes: 1 addition & 1 deletion class/utility.php
Expand Up @@ -112,7 +112,7 @@ public static function checkVerXoops(XoopsModule $module = null, $requiredVer =
break;
}
} else {
if ((int)$v > 0) { // handles things like x.x.x.0_RC2
if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
$success = false;
break;
}
Expand Down

0 comments on commit 0d7d1bc

Please sign in to comment.