Permalink
Browse files

pma spritify part 2

  • Loading branch information...
1 parent bf23143 commit 3b3a9fc7624f857b3ff5f599eee9473a42d71feb @tyronx tyronx committed Jul 15, 2011
View
@@ -433,7 +433,7 @@
<fieldset class="caution">
<legend><?php
if ($cfg['PropertiesIconic']) {
- echo '<img class="icon ic-b_deltbl" src="themes/dot.gif" alt="" />';
+ echo '<img class="icon ic_b_deltbl" src="themes/dot.gif" alt="" />';
}
echo __('Remove database');
?></legend>
@@ -479,7 +479,7 @@
<legend>
<?php
if ($cfg['PropertiesIconic']) {
- echo '<img class="icon ic-b_edit" src="themes/dot.gif" alt="" />';
+ echo '<img class="icon ic_b_edit" src="themes/dot.gif" alt="" />';
}
echo __('Copy database to') . ':';
$drop_clause = 'DROP TABLE / DROP VIEW';
View
@@ -87,7 +87,7 @@ $(document).ready(function() {
});
/** Hide the table link in the initial search result */
- $("#table-info").prepend('<img id="table-image" src="./themes/original/img/s_tbl.png" />').hide();
+ $("#table-info").prepend('<img id="table-image" class="icon ic_s_tbl" src="./themes/dot.gif" />').hide();
/** Hide the browse and deleted results in the new search criteria */
$('#buttonGo').click(function(){
View
@@ -213,7 +213,7 @@ $(document).ready(function() {
PMA_ajaxShowMessage(data.message);
//Fetch inner span of this anchor
//and replace the icon with its disabled version
- var span = $this_anchor.html().replace(/b_empty.png/, 'bd_empty.png');
+ var span = $this_anchor.html().replace(/ic_b_empty/, 'ic_bd_empty');
PMA_adjustTotals($this_anchor);
//To disable further attempts to truncate the table,
View
@@ -2286,10 +2286,10 @@ function initTooltips() {
$(".footnotes").css("padding", "0px");
// Replace the superscripts with the help icon
- $("sup[class='footnotemarker']").hide();
- $("img[class='footnotemarker']").show();
+ $("sup[class~='footnotemarker']").hide();
+ $("img[class~='footnotemarker']").show();
- $("img[class='footnotemarker']").each(function() {
+ $("img[class~='footnotemarker']").each(function() {
var span_id = $(this).attr("id");
span_id = span_id.split("_")[1];
var tooltip_text = $(".footnotes span[id='footnote_" + span_id + "']").html();
@@ -2375,7 +2375,7 @@ $(function() {
});
var img = topmenu.find('li:first-child img');
if (img.length) {
- img.clone().attr('src', img.attr('src').replace(/\/[^\/]+$/, '/b_more.png')).prependTo(link);
+ img.clone().attr('class', 'icon ic_b_more').prependTo(link);
}
var submenu = $('<li />', {'class': 'submenu'})
.append(link)
View
@@ -28,13 +28,13 @@ function toggle(id, only_open) {
if (el.style.display == 'none' || only_open) {
el.style.display = '';
if (img) {
- img.src = image_minus;
+ img.className = 'icon ic_b_minus';
img.alt = '-';
}
} else {
el.style.display = 'none';
if (img) {
- img.src = image_plus;
+ img.className = 'icon ic_b_plus';
img.alt = '+';
}
}
View
@@ -439,7 +439,7 @@ $(function() {
});
$('#serverstatusqueriesdetails tr:first th')
- .append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
+ .append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
break;
@@ -453,7 +453,7 @@ $(function() {
});
$('#serverstatusvariables tr:first th')
- .append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
+ .append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
break;
}
@@ -944,7 +944,7 @@ $(function() {
if(! runtime.redrawCharts)
$(this).html('<img src="themes/dot.gif" class="icon ic_play" alt="" /> ' + PMA_messages['strResumeMonitor']);
else {
- $(this).html('<img src="themes/dot.gif" class="icon ic_play" alt="" /> ' + PMA_messages['strPauseMonitor']);
+ $(this).html('<img src="themes/dot.gif" class="icon ic_pause" alt="" /> ' + PMA_messages['strPauseMonitor']);
if(runtime.charts == null) {
initGrid();
$('a[href="#settingsPopup"]').show();
@@ -1559,7 +1559,7 @@ $(function() {
});
$('div#logTable table thead th')
- .append('<img class="sortableIcon" src="' + pmaThemeImage + 'cleardot.gif" alt="">');
+ .append('<img class="icon sortableIcon" src="themes/dot.gif" alt="">');
$('#loadingLogsDialog').html('<p>' + PMA_messages['strLogDataLoaded'] + '</p>');
View
@@ -96,7 +96,8 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem
insert_rows.align = "center";
var tick_image = document.createElement("img");
- tick_image.src = pmaThemeImage + "s_success.png";
+ tick_image.src = 'themes/dot.gif';
+ tick_image.className = "icon ic_s_success";
if (update_size == '' && insert_size == '' && remove_size == '') {
/**
View
@@ -54,9 +54,9 @@ $(function() {
var charWidth;
// Global vars
- editLink = '<a href="#" class="editLink" onclick="return editVariable(this);"><img src="'+pmaThemeImage+'b_edit.png" alt="" width="16" height="16"> '+PMA_messages['strEdit']+'</a>';
- saveLink = '<a href="#" class="saveLink"><img src="'+pmaThemeImage+'b_save.png" alt="" width="16" height="16"> '+PMA_messages['strSave']+'</a> ';
- cancelLink = '<a href="#" class="cancelLink"><img src="'+pmaThemeImage+'b_close.png" alt="" width="16" height="16"> '+PMA_messages['strCancel']+'</a> ';
+ editLink = '<a href="#" class="editLink" onclick="return editVariable(this);"><img class="icon ic_b_edit" src="themes/dot.gif" alt=""> '+PMA_messages['strEdit']+'</a>';
+ saveLink = '<a href="#" class="saveLink"><img class="icon ic_b_save" src="themes/dot.gif" alt=""> '+PMA_messages['strSave']+'</a> ';
+ cancelLink = '<a href="#" class="cancelLink"><img class="icon ic_b_close" src="themes/dot.gif" alt=""> '+PMA_messages['strCancel']+'</a> ';
$.ajaxSetup({
View
@@ -65,8 +65,8 @@ function appendInlineAnchor() {
var $img_object = $cloned_anchor.find('img').attr('title', PMA_messages['strInlineEdit']);
if ($img_object.length != 0) {
- var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
- $img_object.attr('src', img_src);
+ var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit');
+ $img_object.attr('class', img_class);
$cloned_anchor.find('a').attr('href', '#');
var $edit_span = $cloned_anchor.find('span:contains("' + PMA_messages['strEdit'] + '")');
var $span = $cloned_anchor.find('a').find('span');
@@ -85,8 +85,8 @@ function appendInlineAnchor() {
// the link was too big so <input type="image"> is there
$img_object = $cloned_anchor.find('input:image').attr('title', PMA_messages['strInlineEdit']);
if ($img_object.length > 0) {
- var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit');
- $img_object.attr('src', img_src);
+ var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit');
+ $img_object.attr('class', img_class);
}
$cloned_anchor
.find('.clickprevimage')
@@ -459,8 +459,8 @@ $(document).ready(function() {
// If icons are displayed. See $cfg['PropertiesIconic']
if ($img_object.length > 0) {
$img_object.attr('title', PMA_messages['strSave']);
- var img_src = $img_object.attr('src').replace(/b_inline_edit/,'b_save');
- $img_object.attr('src', img_src);
+ var img_class = $img_object.attr('class').replace(/b_inline_edit/,'b_save');
+ $img_object.attr('class', img_class);
$this_children.prepend($img_object);
}
@@ -479,8 +479,8 @@ $(document).ready(function() {
// If icons are displayed. See $cfg['PropertiesIconic']
if ($img_object.length > 0) {
$img_object.attr('title', PMA_messages['strHide']);
- var img_src = $img_object.attr('src').replace(/b_save/,'b_close');
- $img_object.attr('src', img_src);
+ var img_class = $img_object.attr('class').replace(/b_save/,'b_close');
+ $img_object.attr('class', img_class);
$hide_span.prepend($img_object);
}
@@ -131,7 +131,7 @@ function PMA_auth()
// Defines the charset to be used
header('Content-Type: text/html; charset=utf-8');
// Defines the "item" image depending on text direction
- $item_img = $GLOBALS['pmaThemeImage'] . 'item_' . $GLOBALS['text_dir'] . '.png';
+ $item_img = 'ic_item_' . $GLOBALS['text_dir'];
/* HTML header; do not show here the PMA version to improve security */
$page_title = 'phpMyAdmin ';
View
@@ -1510,7 +1510,7 @@ function PMA_localisedDate($timestamp = -1, $format = '')
* @return string html code for one tab, a link if valid otherwise a span
* @access public
*/
-function PMA_generate_html_tab($tab, $url_params = array())
+function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='')
{
// default values
$defaults = array(
@@ -1572,7 +1572,7 @@ function PMA_generate_html_tab($tab, $url_params = array())
// avoid generating an alt tag, because it only illustrates
// the text that follows and if browser does not display
// images, the text is duplicated
- $image = '<img class="icon %1$s" src="themes/dot.gif"'
+ $image = '<img class="icon %1$s" src="' . $base_dir . 'themes/dot.gif"'
.' width="16" height="16" alt="" />%2$s';
$tab['text'] = sprintf($image, htmlentities($tab['icon']), $tab['text']);
}
@@ -1608,15 +1608,15 @@ function PMA_generate_html_tab($tab, $url_params = array())
* @param string $url_params
* @return string html-code for tab-navigation
*/
-function PMA_generate_html_tabs($tabs, $url_params)
+function PMA_generate_html_tabs($tabs, $url_params, $base_dir='')
{
$tag_id = 'topmenu';
$tab_navigation =
'<div id="' . htmlentities($tag_id) . 'container">' . "\n"
.'<ul id="' . htmlentities($tag_id) . '">' . "\n";
foreach ($tabs as $tab) {
- $tab_navigation .= PMA_generate_html_tab($tab, $url_params);
+ $tab_navigation .= PMA_generate_html_tab($tab, $url_params, $base_dir);
}
$tab_navigation .=
@@ -234,7 +234,7 @@ function display_input($path, $name, $description = '', $type, $value, $value_is
}
if ($is_setup_script && isset($opts['userprefs_comment']) && $opts['userprefs_comment']) {
?>
- <a class="userprefs-comment" title="<?php echo htmlspecialchars($opts['userprefs_comment']) ?>"><img alt="comment" class="icon ic-b_tblops" src="<?php echo $base_dir; ?>themes/dot.gif" /></a>
+ <a class="userprefs-comment" title="<?php echo htmlspecialchars($opts['userprefs_comment']) ?>"><img alt="comment" class="icon ic_b_tblops" src="<?php echo $base_dir; ?>themes/dot.gif" /></a>
<?php
}
if (isset($opts['setvalue']) && $opts['setvalue']) {
@@ -96,17 +96,17 @@ function PMA_SortableTableHeader($title, $sort, $initial_sort_order = 'ASC')
// current sort order is ASC
$order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="sort_arrow" />';
// but on mouse over, show the reverse order (DESC)
- $order_link_params['onmouseover'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc.png\'); }';
+ $order_link_params['onmouseover'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
// on mouse out, show current sort order (ASC)
- $order_link_params['onmouseout'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc.png\'); }';
+ $order_link_params['onmouseout'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
} else {
$future_sort_order = 'ASC';
// current sort order is DESC
$order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="sort_arrow" />';
// but on mouse over, show the reverse order (ASC)
- $order_link_params['onmouseover'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
+ $order_link_params['onmouseover'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }';
// on mouse out, show current sort order (DESC)
- $order_link_params['onmouseout'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
+ $order_link_params['onmouseout'] = 'if($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }';
}
}
@@ -39,7 +39,7 @@
<strong><?php echo __('Create database') . ':&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php
echo '<span class="noPrivileges">'
- . ($cfg['ErrorIconic'] ? '<img src="' . $pmaThemeImage . 's_error2.png" alt="" width="11" height="11" hspace="2" border="0" align="middle" />' : '')
+ . ($cfg['ErrorIconic'] ? '<img class="icon ic_s_error2" src="themes/dot.gif" alt="" hspace="2" border="0" align="middle" />' : '')
. '' . __('No Privileges') .'</span>';
} // end create db form or message
?>
@@ -41,7 +41,7 @@
<legend>
<?php
if ($GLOBALS['cfg']['PropertiesIconic']) {
- echo '<img class="icon" src="' . $pmaThemeImage . 'b_newtbl.png" width="16" height="16" alt="" />';
+ echo '<img class="icon ic_b_newtbl" src="themes/dot.gif" alt="" />';
}
echo sprintf(__('Create table on database %s'), PMA_getDbLink());
?>
@@ -74,7 +74,7 @@ function PMA_exportIsActive($what, $val) {
<div class="exportoptions" id="header">
<h2>
- <img src="<?php echo $GLOBALS['pmaThemeImage'];?>b_export.png" alt="export" />
+ <img class="icon ic_b_export" src="themes/dot.gif" alt="export" />
<?php
if($export_type == 'server') {
echo __('Exporting databases from the current server');
@@ -123,7 +123,7 @@ function(response) {
<div class="exportoptions" id="header">
<h2>
- <img src="<?php echo $GLOBALS['pmaThemeImage'];?>b_import.png" alt="import" />
+ <img class="icon ic_b_import" src="themes/dot.gif" alt="import" />
<?php
if($import_type == 'server') {
echo __('Importing into the current server');
@@ -892,10 +892,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_img = '';
} elseif ('DESC' == $sort_direction) {
$sort_order .= ' ASC';
- $order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" width="11" height="9" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="soimg' . $i . '" />';
+ $order_img = ' <img class="icon ic_s_desc" src="themes/dot.gif" alt="'. __('Descending') . '" title="'. __('Descending') . '" id="soimg' . $i . '" />';
} else {
$sort_order .= ' DESC';
- $order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" width="11" height="9" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="soimg' . $i . '" />';
+ $order_img = ' <img class="icon ic_s_asc" src="themes/dot.gif" alt="'. __('Ascending') . '" title="'. __('Ascending') . '" id="soimg' . $i . '" />';
}
if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@is', $unsorted_sql_query, $regs3)) {
@@ -916,11 +916,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_link_params = array();
if (isset($order_img) && $order_img!='') {
if (strstr($order_img, 'asc')) {
- $order_link_params['onmouseover'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
- $order_link_params['onmouseout'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
+ $order_link_params['onmouseover'] = 'if($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_desc\'); }';
+ $order_link_params['onmouseout'] = 'if($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_asc\'); }';
} elseif (strstr($order_img, 'desc')) {
- $order_link_params['onmouseover'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
- $order_link_params['onmouseout'] = 'if(document.getElementById(\'soimg' . $i . '\')){ document.getElementById(\'soimg' . $i . '\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
+ $order_link_params['onmouseover'] = 'if($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_asc\'); }';
+ $order_link_params['onmouseout'] = 'if($(\'#soimg' . $i . '\').length > 0) { $(\'#soimg' . $i . '\').attr(\'class\', \'icon ic_s_desc\'); }';
}
}
if ($GLOBALS['cfg']['HeaderFlipType'] == 'auto') {
View
@@ -162,7 +162,7 @@
echo '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
- echo '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 'window-new.png"'
+ echo '<img class="icon ic_window-new" src="themes/dot.gif"'
. ' alt="' . __('Open new phpMyAdmin window') . '" />';
}
if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
Oops, something went wrong.

0 comments on commit 3b3a9fc

Please sign in to comment.