diff --git a/db_operations.php b/db_operations.php index 0bfedb0629..fa0f10894c 100644 --- a/db_operations.php +++ b/db_operations.php @@ -401,7 +401,7 @@ if ($db != 'mysql') { '; + echo PMA_getImage('b_edit.png'); } echo __('Rename database to') . ':'; ?> @@ -427,7 +427,7 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
'; + echo PMA_getImage('b_deltbl.png'); } echo __('Remove database'); ?> @@ -473,7 +473,7 @@ echo __('Remove database'); '; + echo PMA_getImage('b_edit.png'); } echo __('Copy database to') . ':'; $drop_clause = 'DROP TABLE / DROP VIEW'; @@ -537,7 +537,7 @@ echo __('Remove database'); . '
' . "\n" . ' '; if ($cfg['PropertiesIconic']) { - echo ''; + echo PMA_getImage('s_asci.png'); } echo ' ' . "\n" . ' ' . "\n" @@ -584,7 +584,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?> */ echo ''; } // end if diff --git a/db_structure.php b/db_structure.php index 3926eaef82..faa5e02fca 100644 --- a/db_structure.php +++ b/db_structure.php @@ -307,12 +307,14 @@ foreach ($tables as $keyname => $each_table) { if (PMA_Tracker::isActive()) { if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) { $tracking_icon = ''
-                . __('Tracking is active.') . ''; + . '&table=' . $truename . '">' + . PMA_getImage('eye.png', __('Tracking is active.')) + . ''; } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) { $tracking_icon = ''
-                . __('Tracking is not active.') . ''; + . '&table=' . $truename . '">' + . PMA_getImage('eye.png', __('Tracking is not active.')) + . ''; } } @@ -377,10 +379,10 @@ foreach ($tables as $keyname => $each_table) { ' + ? PMA_getImage('s_cancel.png', 'NOT REPLICATED') : ''. $do - ? ' REPLICATED' + ? PMA_getImage('s_success.png', 'REPLICATED') : ''; ?> diff --git a/db_tracking.php b/db_tracking.php index c876204be7..2f5645aeae 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -98,7 +98,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { $drop_image_or_text = ''; if (true == $GLOBALS['cfg']['PropertiesIconic']) { - $drop_image_or_text .= '' . __('Delete tracking data for this table') . ''; + $drop_image_or_text .= PMA_getImage('b_drop.png', __('Delete tracking data for this table')); } if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) { $drop_image_or_text .= __('Drop'); diff --git a/js/db_search.js b/js/db_search.js index aef5047be2..79efddb2a9 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -88,7 +88,7 @@ $(document).ready(function() { }); /** Hide the table link in the initial search result */ - $("#table-info").prepend('').hide(); + $("#table-info").prepend(PMA_getImage('s_tbl.png', '', {'id': 'table-image'}).toString()).hide(); /** Hide the browse and deleted results in the new search criteria */ $('#buttonGo').click(function(){ diff --git a/js/db_structure.js b/js/db_structure.js index c3b280a651..a6229c7720 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -219,7 +219,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(/ic_b_empty/, 'ic_bd_empty'); + var span = $this_anchor.html().replace(/b_empty/, 'bd_empty'); PMA_adjustTotals($this_anchor); //To disable further attempts to truncate the table, diff --git a/js/functions.js b/js/functions.js index f67b6a9c97..b8db5151ef 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2843,7 +2843,7 @@ $(function() { }); var img = topmenu.find('li:first-child img'); if (img.length) { - img.clone().attr('class', 'icon ic_b_more').prependTo(link); + $(PMA_getImage('b_more.png').toString()).prependTo(link); } var submenu = $('
  • ', {'class': 'submenu'}) .append(link) diff --git a/js/get_image.js.php b/js/get_image.js.php new file mode 100644 index 0000000000..07ccc5e73e --- /dev/null +++ b/js/get_image.js.php @@ -0,0 +1,130 @@ +getPath() . '/sprites.lib.php')) { + include $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php'; +} +$sprites = array(); +if (function_exists('PMA_sprites')) { + $sprites = PMA_sprites(); +} +// We only need the keys from the array of sprites data, +// since they contain the (partial) class names +$keys = array(); +foreach ($sprites as $key => $value) { + $keys[] = "'$key'"; +} + +?> +/** + * Returns an HTML IMG tag for a particular image from a theme, + * which may be an actual file or an icon from a sprite + * + * @param string image The name of the file to get + * @param string alternate Used to set 'alt' and 'title' attributes of the image + * @param object attributes An associative array of other attributes + * + * @return Object The requested image, this object has two methods: + * .toString() - Returns the IMG tag for the requested image + * .attr(name) - Returns a particular attribute of the IMG + * tag given it's name + * And one property: + * .isSprite - Whether the image is a sprite or not + */ +function PMA_getImage(image, alternate, attributes) { + var in_array = function (needle, haystack) { + for (i in haystack) { + if (haystack[i] == needle) { + return true; + } + } + return false; + }; + var sprites = [ + + ]; + // custom image object, it will eventually be returned by this functions + var retval = { + data: { + // this is private + alt: '', + title: '', + src: 'themes/dot.gif', + }, + isSprite: true, + attr: function (name) { + if (this.data[name] == undefined) { + return ''; + } else { + return this.data[name]; + } + }, + toString: function () { + var retval = '<' + 'img'; + for (var i in this.data) { + retval += ' ' + i + '="' + this.data[i] + '"'; + } + retval += ' /' + '>'; + return retval; + } + }; + // initialise missing parameters + if (attributes == undefined) { + attributes = {}; + } + if (alternate == undefined) { + alternate = ''; + } + // set alt + if (attributes.alt != undefined) { + retval.data.alt = attributes.alt; + } else { + retval.data.alt = alternate; + } + // set title + if (attributes.title != undefined) { + retval.data.title = attributes.title; + } else { + retval.data.title = alternate; + } + // set src + var klass = image.replace('.gif', '').replace('.png', ''); + if (in_array(klass, sprites)) { + // it's an icon from a sprite + retval.data.class = 'icon ic_' + klass; + } else { + // it's an image file + retval.isSprite = false; + retval.data.src = "getImgPath(); ?>" + image; + } + // set all other attrubutes + for (var i in attributes) { + if (i == 'src') { + // do not allow to override the 'src' attribute + continue; + } else if (i == 'class') { + retval.data[i] += ' ' + attributes[i]; + } else { + retval.data[i] = attributes[i]; + } + } + + return retval; +}; diff --git a/js/navigation.js b/js/navigation.js index e4d7a207b1..724d9f9d9b 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -29,13 +29,17 @@ function toggle(id, only_open) if (el.style.display == 'none' || only_open) { el.style.display = ''; if (img) { - img.className = 'icon ic_b_minus'; + var newimg = PMA_getImage('b_minus.png'); + img.className = newimg.attr('class'); + img.src = newimg.attr('src'); img.alt = '-'; } } else { el.style.display = 'none'; if (img) { - img.className = 'icon ic_b_plus'; + var newimg = PMA_getImage('b_plus.png'); + img.className = newimg.attr('class'); + img.src = newimg.attr('src'); img.alt = '+'; } } diff --git a/js/pmd/history.js b/js/pmd/history.js index fdc76c8c48..edace46c56 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -73,12 +73,12 @@ function display(init,finit) else { str +=''; } - str +='' + history_array[i].get_column_name(); + str +='' + PMA_getImage('b_sbrowse.png', 'column name') + '' + history_array[i].get_column_name(); if (history_array[i].get_type() == "GroupBy" || history_array[i].get_type() == "OrderBy") { - str += '' + history_array[i].get_type() + ''; + str += '' + PMA_getImage('b_info.png', detail(i)) + '' + history_array[i].get_type() + '' + PMA_getImage('b_drop.png', 'Delete') + ''; } else { - str += '' + history_array[i]. get_type() + ''; + str += '' + PMA_getImage('b_info.png', detail(i)) + '' + history_array[i]. get_type() + '' + PMA_getImage('b_edit.png', PMA_messages['strEdit']) + ''; } i++; if(i >= history_array.length) { diff --git a/js/server_status.js b/js/server_status.js index 594e8d9ed2..86da8ea8b8 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -715,7 +715,7 @@ function serverResponseError() { }; $('#emptyDialog').attr('title', PMA_messages['strRefreshFailed']); $('#emptyDialog').html( - ' ' + + PMA_getImage('s_attention.png') + PMA_messages['strInvalidResponseExplanation'] ); $('#emptyDialog').dialog({ buttons: btns }); diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 12a41d3988..1f68f22c30 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -585,9 +585,9 @@ $(function() { $('a[href="#pauseCharts"]').click(function() { runtime.redrawCharts = ! runtime.redrawCharts; if (! runtime.redrawCharts) { - $(this).html(' ' + PMA_messages['strResumeMonitor']); + $(this).html(PMA_getImage('play.png') + ' ' + PMA_messages['strResumeMonitor']); } else { - $(this).html(' ' + PMA_messages['strPauseMonitor']); + $(this).html(PMA_getImage('pause.png') + ' ' + PMA_messages['strPauseMonitor']); if (! runtime.charts) { initGrid(); $('a[href="#settingsPopup"]').show(); @@ -613,7 +613,7 @@ $(function() { $.get('server_status.php?' + url_query, vars, function(data) { var logVars = $.parseJSON(data), - icon = 'ic_s_success', msg='', str=''; + icon = PMA_getImage('s_success.png'), msg='', str=''; if (logVars['general_log'] == 'ON') { if (logVars['slow_query_log'] == 'ON') { @@ -628,28 +628,28 @@ $(function() { } if (msg.length == 0) { - icon = 'ic_s_error'; + icon = PMA_getImage('s_error.png'); msg = PMA_messages['strBothLogOff']; } str = '' + PMA_messages['strCurrentSettings'] + '
    '; - str += ' ' + msg + '
    '; + str += icon + msg + '
    '; if (logVars['log_output'] != 'TABLE') { - str += ' ' + PMA_messages['strLogOutNotTable'] + '
    '; + str += PMA_getImage('s_error.png') + ' ' + PMA_messages['strLogOutNotTable'] + '
    '; } else { - str += ' ' + PMA_messages['strLogOutIsTable'] + '
    '; + str += PMA_getImage('s_success.png') + ' ' + PMA_messages['strLogOutIsTable'] + '
    '; } if (logVars['slow_query_log'] == 'ON') { if (logVars['long_query_time'] > 2) { - str += ' ' + str += PMA_getImage('s_attention.png') + ' ' + $.sprintf(PMA_messages['strSmallerLongQueryTimeAdvice'], logVars['long_query_time']) + '
    '; } if (logVars['long_query_time'] < 2) { - str += ' ' + str += PMA_getImage('s_success.png') + ' ' + $.sprintf(PMA_messages['strLongQueryTimeSet'], logVars['long_query_time']) + '
    '; } @@ -1660,7 +1660,7 @@ $(function() { // Append a tooltip to the count column, if there exist one if ($('#logTable th:last').html() == '#') { - $('#logTable th:last').append(' '); + $('#logTable th:last').append(' ' + PMA_getImage('b_docs.png', '', {'class': 'qroupedQueryInfoIcon'})); var qtipContent = PMA_messages['strCountColumnExplanation']; if (groupInserts) { @@ -1861,4 +1861,4 @@ $(function() { // Run the monitor once loaded $(function() { $('a[href="#pauseCharts"]').trigger('click'); -}); \ No newline at end of file +}); diff --git a/js/server_synchronize.js b/js/server_synchronize.js index 8425423c2b..a58253bb71 100644 --- a/js/server_synchronize.js +++ b/js/server_synchronize.js @@ -96,8 +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 = 'themes/dot.gif'; - tick_image.className = "icon ic_s_success"; + tick_image.src = PMA_getImage('s_success.png').attr('src'); + tick_image.className = PMA_getImage('s_success.png').attr('class'); if (update_size == '' && insert_size == '' && remove_size == '') { /** diff --git a/js/server_variables.js b/js/server_variables.js index cb4f8c3a02..93bc348515 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -4,9 +4,9 @@ $(function() { var $tmpDiv, charWidth; // Global vars - editLink = ' '+PMA_messages['strEdit']+''; - saveLink = ' '+PMA_messages['strSave']+' '; - cancelLink = ' '+PMA_messages['strCancel']+' '; + editLink = '' + PMA_getImage('b_edit.png') + ' ' + PMA_messages['strEdit'] + ''; + saveLink = '' + PMA_getImage('b_save.png') + ' ' + PMA_messages['strSave'] + ' '; + cancelLink = '' + PMA_getImage('b_close.png') + ' ' + PMA_messages['strCancel'] + ' '; $.ajaxSetup({ cache:false @@ -190,4 +190,4 @@ function editVariable(link) }); return false; -} \ No newline at end of file +} diff --git a/js/tbl_select.js b/js/tbl_select.js index 1808b73230..faffeefde4 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -120,7 +120,7 @@ $(document).ready(function() { 'ST_Intersects', 'ST_Overlaps', 'ST_Touches', - 'ST_Within', + 'ST_Within' ]; var tempArray = [ diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php index 817e4c3517..0dbeb5e252 100644 --- a/libraries/Theme.class.php +++ b/libraries/Theme.class.php @@ -311,6 +311,18 @@ class PMA_Theme } include $_css_file; + + if ($type != 'print') { + $_sprites_data_file = $this->getPath() . '/sprites.lib.php'; + $_sprites_css_file = './themes/sprites.css.php'; + if ( (file_exists($_sprites_data_file) && is_readable($_sprites_data_file)) + && (file_exists($_sprites_css_file) && is_readable($_sprites_css_file)) + ) { + include $_sprites_data_file; + include $_sprites_css_file; + } + } + return true; } diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index b19646154c..c50f2e38b8 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -132,8 +132,6 @@ 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 = 'ic_item_' . $GLOBALS['text_dir']; /* HTML header; do not show here the PMA version to improve security */ $page_title = 'phpMyAdmin '; @@ -198,9 +196,9 @@ if (top != self) { '; + 'title="' . __('phpMyAdmin documentation') . '"> '; if ($GLOBALS['cfg']['ReplaceHelpImg']) { - echo '' . __('phpMyAdmin documentation') . ''; + echo PMA_getImage('b_help.png', __('phpMyAdmin documentation')); } else { echo '(*)'; } diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 2aabf6fb93..2cc2278d42 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -71,53 +71,106 @@ function PMA_pow($base, $exp, $use_function = false) } /** - * string PMA_getIcon(string $icon) + * Returns an HTML IMG tag for a particular icon from a theme, + * which may be an actual file or an icon from a sprite. + * This function takes into account the PropertiesIconic + * configuration setting and wraps the image tag in a span tag. * * @param string $icon name of icon file * @param string $alternate alternate text * @param boolean $force_text whether to force alternate text to be displayed - * @param boolean $noSprite If true, the image source will be not replaced - * with a CSS Sprite * - * @return html img tag + * @return string an html snippet */ -function PMA_getIcon($icon, $alternate = '', $force_text = false, $noSprite = false) +function PMA_getIcon($icon, $alternate = '', $force_text = false) { // $cfg['PropertiesIconic'] is true or both $include_icon = ($GLOBALS['cfg']['PropertiesIconic'] !== false); // $cfg['PropertiesIconic'] is false or both // OR we have no $include_icon $include_text = ($force_text || true !== $GLOBALS['cfg']['PropertiesIconic']); - $alternate = htmlspecialchars($alternate); - $button = ''; // Always use a span (we rely on this in js/sql.js) - $button .= ''; - + $button = ''; if ($include_icon) { - if ($noSprite) { - $button .= ''; - } else { - $button .= '' . $alternate . ''; - } + $button .= PMA_getImage($icon, $alternate); } - if ($include_icon && $include_text) { $button .= ' '; } - if ($include_text) { $button .= $alternate; } - $button .= ''; return $button; } +/** + * Returns an HTML IMG tag for a particular image from a theme, + * which may be an actual file or an icon from a sprite + * + * @param string $image The name of the file to get + * @param string $alternate Used to set 'alt' and 'title' attributes of the image + * @param array $attributes An associative array of other attributes + * + * @return string an html IMG tag + */ +function PMA_getImage($image, $alternate = '', $attributes = array()) +{ + $url = ''; + $is_sprite = false; + $alternate = htmlspecialchars($alternate); + + // Check if we have the requested image as a sprite + // and set $url accordingly + if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) { + include_once $_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php'; + $sprites = PMA_sprites(); + $class = str_replace(array('.gif','.png'), '', $image); + if (array_key_exists($class, $sprites)) { + $is_sprite = true; + $url = 'themes/dot.gif'; + } else { + $url = $GLOBALS['pmaThemeImage'] . $image; + } + } else { + $url = $GLOBALS['pmaThemeImage'] . $image; + } + // set class attribute + if ($is_sprite) { + if (isset($attributes['class'])) { + $attributes['class'] = "icon ic_$class " . $attributes['class']; + } else { + $attributes['class'] = "icon ic_$class"; + } + } + // set all other attributes + $attr_str = ''; + foreach ($attributes as $key => $value) { + if (! in_array($key, array('alt', 'title'))) { + $attr_str .= " $key=\"$value\""; + } + } + // override the alt attribute + if (isset($attributes['alt'])) { + $alt = $attributes['alt']; + } else { + $alt = $alternate; + } + // override the title attribute + if (isset($attributes['title'])) { + $title = $attributes['title']; + } else { + $title = $alternate; + } + // generate the IMG tag + $template = '%s'; + $retval = sprintf($template, $url, $title, $alt, $attr_str); + + return $retval; +} + /** * Displays the maximum size for an upload * @@ -409,11 +462,9 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju if ($just_open) { return $open_link; } elseif ($big_icon) { - return $open_link . ''
-            . __('Documentation') . ''; + return $open_link . PMA_getImage('b_sqlhelp.png', __('Documentation')) . ''; } elseif ($GLOBALS['cfg']['ReplaceHelpImg']) { - return $open_link . ''
-            . __('Documentation') . ''; + return $open_link . PMA_getImage('b_help.png', __('Documentation')) . ''; } else { return '[' . $open_link . __('Documentation') . ']'; } @@ -433,8 +484,8 @@ function PMA_showDocu($anchor) { if ($GLOBALS['cfg']['ReplaceHelpImg']) { return '' - . ''
-            . __('Documentation') . ''; + . PMA_getImage('b_help.png', __('Documentation')) + . ''; } else { return '[' . __('Documentation') . ']'; @@ -456,8 +507,8 @@ function PMA_showPHPDocu($target) if ($GLOBALS['cfg']['ReplaceHelpImg']) { return '' - . ''
-            . __('Documentation') . ''; + . PMA_getImage('b_help.png', __('Documentation')) + . ''; } else { return '[' . __('Documentation') . ']'; } @@ -503,7 +554,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice') // footnotemarker used in js/tooltip.js return '' . $nr . '' . - ''; + PMA_getImage('b_help.png', '', array('class' => 'footnotemarker footnote_' . $nr)); } /** @@ -1686,9 +1737,8 @@ function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='') // 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 = '%2$s'; - $tab['text'] = sprintf($image, htmlentities($tab['icon']), $tab['text']); + $tab['text'] = PMA_getImage(htmlentities($tab['icon'])) . $tab['text']; + } elseif (empty($tab['text'])) { // check to not display an empty link-text $tab['text'] = '?'; diff --git a/libraries/config/FormDisplay.tpl.php b/libraries/config/FormDisplay.tpl.php index c4bdacc4e8..a9e509a21a 100644 --- a/libraries/config/FormDisplay.tpl.php +++ b/libraries/config/FormDisplay.tpl.php @@ -159,8 +159,8 @@ function display_input($path, $name, $description = '', $type, $value, $value_is - Doc - Wiki + + @@ -234,17 +234,17 @@ function display_input($path, $name, $description = '', $type, $value, $value_is } if ($is_setup_script && isset($opts['userprefs_comment']) && $opts['userprefs_comment']) { ?> - comment + - " title="" style="display:none">set-value + " title="" style="display:none"> - + '; } -?> \ No newline at end of file +?> diff --git a/libraries/db_links.inc.php b/libraries/db_links.inc.php index ed30283ef4..8f49d3fd76 100644 --- a/libraries/db_links.inc.php +++ b/libraries/db_links.inc.php @@ -46,63 +46,63 @@ if ($num_tables == 0) { $tab_structure['link'] = 'db_structure.php'; $tab_structure['text'] = __('Structure'); -$tab_structure['icon'] = 'ic_b_props'; +$tab_structure['icon'] = 'b_props.png'; $tab_sql['link'] = 'db_sql.php'; $tab_sql['args']['db_query_force'] = 1; $tab_sql['text'] = __('SQL'); -$tab_sql['icon'] = 'ic_b_sql'; +$tab_sql['icon'] = 'b_sql.png'; $tab_export['text'] = __('Export'); -$tab_export['icon'] = 'ic_b_export'; +$tab_export['icon'] = 'b_export.png'; $tab_export['link'] = 'db_export.php'; $tab_search['text'] = __('Search'); -$tab_search['icon'] = 'ic_b_search'; +$tab_search['icon'] = 'b_search.png'; $tab_search['link'] = 'db_search.php'; if (PMA_Tracker::isActive()) { $tab_tracking['text'] = __('Tracking'); - $tab_tracking['icon'] = 'ic_eye'; + $tab_tracking['icon'] = 'eye.png'; $tab_tracking['link'] = 'db_tracking.php'; } $tab_qbe['text'] = __('Query'); -$tab_qbe['icon'] = 'ic_s_db'; +$tab_qbe['icon'] = 's_db.png'; $tab_qbe['link'] = 'db_qbe.php'; if ($cfgRelation['designerwork']) { $tab_designer['text'] = __('Designer'); - $tab_designer['icon'] = 'ic_b_relations'; + $tab_designer['icon'] = 'b_relations.png'; $tab_designer['link'] = 'pmd_general.php'; } if (! $db_is_information_schema) { $tab_import['link'] = 'db_import.php'; $tab_import['text'] = __('Import'); - $tab_import['icon'] = 'ic_b_import'; + $tab_import['icon'] = 'b_import.png'; $tab_operation['link'] = 'db_operations.php'; $tab_operation['text'] = __('Operations'); - $tab_operation['icon'] = 'ic_b_tblops'; + $tab_operation['icon'] = 'b_tblops.png'; if ($is_superuser && !PMA_DRIZZLE) { $tab_privileges['link'] = 'server_privileges.php'; $tab_privileges['args']['checkprivs'] = $db; // stay on database view $tab_privileges['args']['viewing_mode'] = 'db'; $tab_privileges['text'] = __('Privileges'); - $tab_privileges['icon'] = 'ic_s_rights'; + $tab_privileges['icon'] = 's_rights.png'; } $tab_routines['link'] = 'db_routines.php'; $tab_routines['text'] = __('Routines'); - $tab_routines['icon'] = 'ic_b_routines'; + $tab_routines['icon'] = 'b_routines.png'; $tab_events['link'] = 'db_events.php'; $tab_events['text'] = __('Events'); - $tab_events['icon'] = 'ic_b_events'; + $tab_events['icon'] = 'b_events.png'; $tab_triggers['link'] = 'db_triggers.php'; $tab_triggers['text'] = __('Triggers'); - $tab_triggers['icon'] = 'ic_b_triggers'; + $tab_triggers['icon'] = 'b_triggers.png'; } /** diff --git a/libraries/db_structure.lib.php b/libraries/db_structure.lib.php index d2702eb128..961c64a3bb 100644 --- a/libraries/db_structure.lib.php +++ b/libraries/db_structure.lib.php @@ -94,19 +94,21 @@ function PMA_SortableTableHeader($title, $sort, $initial_sort_order = 'ASC') if ($requested_sort_order == 'ASC') { $future_sort_order = 'DESC'; // current sort order is ASC - $order_img = ' '. __('Ascending') . ''; + $order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => 'sort_arrow', 'title' => '')); + $order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => 'sort_arrow hide', 'title' => '')); // 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\'); }'; + $order_link_params['onmouseover'] = "$('.sort_arrow').toggle();"; // 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\'); }'; + $order_link_params['onmouseout'] = "$('.sort_arrow').toggle();"; } else { $future_sort_order = 'ASC'; // current sort order is DESC - $order_img = ' '. __('Descending') . ''; + $order_img = ' ' . PMA_getImage('s_asc.png', __('Ascending'), array('class' => 'sort_arrow hide', 'title' => '')); + $order_img .= ' ' . PMA_getImage('s_desc.png', __('Descending'), array('class' => 'sort_arrow', 'title' => '')); // but on mouse over, show the reverse order (ASC) - $order_link_params['onmouseover'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_asc\'); }'; + $order_link_params['onmouseover'] = "$('.sort_arrow').toggle();"; // on mouse out, show current sort order (DESC) - $order_link_params['onmouseout'] = 'if ($(\'#sort_arrow\').length > 0) { $(\'#sort_arrow\').attr(\'class\',\'icon ic_s_desc\'); }'; + $order_link_params['onmouseout'] = "$('.sort_arrow').toggle();"; } } diff --git a/libraries/display_create_database.lib.php b/libraries/display_create_database.lib.php index eac2c1da95..121e2a8a2a 100644 --- a/libraries/display_create_database.lib.php +++ b/libraries/display_create_database.lib.php @@ -39,7 +39,7 @@ if ($is_create_db_priv) {
    ' - . ($cfg['ErrorIconic'] ? '' : '') + . ($cfg['ErrorIconic'] ? PMA_getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) : '') . '' . __('No Privileges') .'
    '; } // end create db form or message ?> diff --git a/libraries/display_create_table.lib.php b/libraries/display_create_table.lib.php index 834134269f..bd963ae7ce 100644 --- a/libraries/display_create_table.lib.php +++ b/libraries/display_create_table.lib.php @@ -41,7 +41,7 @@ $is_create_table_priv = true; '; + echo PMA_getImage('b_newtbl.png'); } echo sprintf(__('Create table on database %s'), PMA_getDbLink()); ?> diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index b855191a98..8ee404c1bf 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -76,7 +76,7 @@ if (isset($_GET['sql_query'])) {