[*] BO : moved 2 javascript functions to display success or error on AdminAccess are now available everywhere (thanks to Loic)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8825 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
2b3e74baaa
commit
877074f659
3 files changed
+19
-12
No files matched your search
@@ -140,16 +140,6 @@ class AdminAccess extends AdminTab
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function showSuccessMessage(msg)
|
|
||||||
{
|
|
||||||
$("#ajax_confirmation").show().html("<div style=\"background-color:green;color:white;padding:20px;position:fixed;bottom:0;width:100%;left:0;text-align:center;\">"+msg+"</div>").delay(3000).fadeOut("slow");
|
|
||||||
}
|
|
||||||
|
|
||||||
function showErrorMessage(msg)
|
|
||||||
{
|
|
||||||
$("#ajax_confirmation").show().html("<div class=\"error\"><img src=\"../img/admin/error.png\" alt=\"ERROR\" />"+msg+"</div>");
|
|
||||||
}
|
|
||||||
</script>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -174,7 +164,6 @@ class AdminAccess extends AdminTab
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setLang(Array(\''.$this->l('Profile updated').'\', \''.$this->l('Request failed!').'\', \''.$this->l('Update in progress. Please wait.').'\', \''.$this->l('Server connection failed!').'\'));
|
setLang(Array(\''.$this->l('Profile updated').'\', \''.$this->l('Request failed!').'\', \''.$this->l('Update in progress. Please wait.').'\', \''.$this->l('Server connection failed!').'\'));
|
||||||
</script>
|
</script>
|
||||||
<div id="ajax_confirmation"></div>
|
|
||||||
<table class="table float" cellspacing="0">
|
<table class="table float" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th '.($currentProfile == (int)_PS_ADMIN_PROFILE_ ? 'colspan="6"' : '').'>
|
<th '.($currentProfile == (int)_PS_ADMIN_PROFILE_ ? 'colspan="6"' : '').'>
|
||||||
|
|||||||
@@ -43,5 +43,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="ajax_confirmation" style="display:none"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+18
-1
@@ -886,4 +886,21 @@ function refreshImagePositions(imageTable)
|
|||||||
imageTable.find("tr td.dragHandle a:hidden").show();
|
imageTable.find("tr td.dragHandle a:hidden").show();
|
||||||
imageTable.find("tr td.dragHandle:first a:first").hide();
|
imageTable.find("tr td.dragHandle:first a:first").hide();
|
||||||
imageTable.find("tr td.dragHandle:last a:last").hide();
|
imageTable.find("tr td.dragHandle:last a:last").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** display a success message in a #ajax_confirmation container
|
||||||
|
* @param string msg string to display
|
||||||
|
*/
|
||||||
|
function showSuccessMessage(msg)
|
||||||
|
{
|
||||||
|
$("#ajax_confirmation").show().html("<div style=\"background-color:green;color:white;padding:20px;position:fixed;bottom:0;width:100%;left:0;text-align:center;\">"+msg+"</div>").delay(3000).fadeOut("slow");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** display a warning message in a #ajax_confirmation container
|
||||||
|
* @param string msg string to display
|
||||||
|
*/
|
||||||
|
function showErrorMessage(msg)
|
||||||
|
{
|
||||||
|
$("#ajax_confirmation").show()
|
||||||
|
.html("<div class=\"error\"><img src=\"../img/admin/error.png\" alt=\"ERROR\" />"+msg+"</div>");
|
||||||
|
}
|
||||||
Reference in new issue
Block a user