aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-05-23 11:25:50 +0000
committermistic100 <mistic@piwigo.org>2011-05-23 11:25:50 +0000
commitcf1a7f6df7fb0b475dab583d73fb9e27b7316ef0 (patch)
tree91ece88cd141abc20c28dfa5839881950de2004a
parent2b00bd8c475e04fde251c0890e0d2ee9df149735 (diff)
TokenInput : order tags, theme for roma, 'new' text translated
git-svn-id: http://piwigo.org/svn/trunk@11008 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/include/functions.php6
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl1
-rw-r--r--admin/themes/default/template/batch_manager_unit.tpl1
-rw-r--r--admin/themes/default/template/picture_modify.tpl1
-rw-r--r--admin/themes/default/theme.css2
-rw-r--r--admin/themes/roma/theme.css7
-rw-r--r--language/en_UK/admin.lang.php1
-rw-r--r--language/fr_FR/admin.lang.php1
-rw-r--r--themes/default/js/plugins/jquery.tokeninput.js5
9 files changed, 21 insertions, 4 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 8095daf0f..20bfbfb51 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2100,6 +2100,7 @@ function get_active_menu($menu_page)
function get_fckb_taglist($query)
{
$result = pwg_query($query);
+
$taglist = array();
while ($row = pwg_db_fetch_assoc($result))
{
@@ -2111,7 +2112,10 @@ function get_fckb_taglist($query)
)
);
}
-
+
+ $cmp = create_function('$a,$b', 'return strcasecmp($a["name"], $b["name"]);');
+ usort($taglist, $cmp);
+
return $taglist;
}
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 2befd2e9d..641fd61f8 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -19,6 +19,7 @@ jQuery(document).ready(function() {
hintText: '{'Type in a search term'|@translate}',
noResultsText: '{'No results'|@translate}',
searchingText: '{'Searching...'|@translate}',
+ newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
allowCreation: true
diff --git a/admin/themes/default/template/batch_manager_unit.tpl b/admin/themes/default/template/batch_manager_unit.tpl
index 03167242b..dec11a998 100644
--- a/admin/themes/default/template/batch_manager_unit.tpl
+++ b/admin/themes/default/template/batch_manager_unit.tpl
@@ -23,6 +23,7 @@ jQuery(document).ready(function() {
hintText: '{'Type in a search term'|@translate}',
noResultsText: '{'No results'|@translate}',
searchingText: '{'Searching...'|@translate}',
+ newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
allowCreation: true
diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl
index 0908c99b7..5c6b2bf08 100644
--- a/admin/themes/default/template/picture_modify.tpl
+++ b/admin/themes/default/template/picture_modify.tpl
@@ -13,6 +13,7 @@ jQuery(document).ready(function() {
hintText: '{'Type in a search term'|@translate}',
noResultsText: '{'No results'|@translate}',
searchingText: '{'Searching...'|@translate}',
+ newText: ' ({'new'|@translate})',
animateDropdown: false,
preventDuplicates: true,
allowCreation: true
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css
index 8ea18252b..20a6b3aad 100644
--- a/admin/themes/default/theme.css
+++ b/admin/themes/default/theme.css
@@ -1022,7 +1022,7 @@ li.token-input-token {overflow: hidden; height: auto !important; height: 15px;ma
li.token-input-token p {display: inline;padding: 0;margin: 0;}
li.token-input-token span {color: #a6b3cf;margin-left: 5px;font-weight: bold;cursor: pointer;}
li.token-input-selected-token {background-color: #5670a6;border: 1px solid #3b5998;color: #fff;}
-li.token-input-input-token {float: left;margin: 0;padding: 0;list-style-type: none;}
+li.token-input-input-token {float: left;margin: 0;padding: 0;list-style-type: none;width:10px;}
div.token-input-dropdown {position: absolute;width: 400px;background-color: #fff;overflow: hidden;border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;cursor: default;font-size: 11px;font-family: Verdana;z-index: 1;}
div.token-input-dropdown p {margin: 0;padding: 5px;font-weight: bold;color: #777;}
div.token-input-dropdown ul {margin: 0;padding: 0;}
diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css
index b32c49cb9..1a75134f7 100644
--- a/admin/themes/roma/theme.css
+++ b/admin/themes/roma/theme.css
@@ -249,3 +249,10 @@ display:block; height:85px; left:225px; position:relative; top:-42px; width:313p
#batchManagerGlobal .thumbSelected {background-color:#555 !important}
#batchManagerGlobal #selectedMessage {background-color:#555; color:#ddd;}
+/* TokenInput (with Facebook style for ROMA) */
+ul.token-input-list {border-color:#666;background-color:#444;}
+ul.token-input-list li input {background-color:#444;}
+li.token-input-token span {color:#878787;}
+div.token-input-dropdown {background-color:#eee;border-color:#666;}
+div.token-input-dropdown ul li {background-color:#eee;}
+div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color:#FF7800;}
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 86d7a2217..700baa844 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -431,6 +431,7 @@ $lang['Month'] = "Month";
$lang['Move albums'] = "Move albums";
$lang['Move'] = "Move";
$lang['Name'] = "Name";
+$lang['new'] = "new";
$lang['New name'] = "New name";
$lang['New parent album'] = "New parent album";
$lang['New photos added'] = "New photos added";
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 606a43472..16f9bec32 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -845,4 +845,5 @@ $lang['Show menubar'] = "Afficher le menu";
$lang['No results'] = "Pas de résultat";
$lang['Type in a search term'] = "Entrez un terme de recherche";
$lang['Searching...'] = "Recherche...";
+$lang['new'] = "nouveau";
?> \ No newline at end of file
diff --git a/themes/default/js/plugins/jquery.tokeninput.js b/themes/default/js/plugins/jquery.tokeninput.js
index 52d43d6ad..0c8662b3b 100644
--- a/themes/default/js/plugins/jquery.tokeninput.js
+++ b/themes/default/js/plugins/jquery.tokeninput.js
@@ -21,6 +21,7 @@ var DEFAULT_SETTINGS = {
hintText: "Type in a search term",
noResultsText: "No results",
searchingText: "Searching...",
+ newText: "(new)",
deleteText: "&times;",
searchDelay: 300,
minChars: 1,
@@ -705,7 +706,7 @@ $.TokenList = function (input, url_or_data, settings) {
}
if(settings.allowCreation) {
- results.push({name: input_box.val() + ' (new)', id: input_box.val()});
+ results.push({name: input_box.val() + settings.newText, id: input_box.val()});
}
cache.add(query, settings.jsonContainer ? results[settings.jsonContainer] : results);
@@ -728,7 +729,7 @@ $.TokenList = function (input, url_or_data, settings) {
}
if(settings.allowCreation) {
- results.push({name: input_box.val() + ' (new)', id: input_box.val()});
+ results.push({name: input_box.val() + settings.newText, id: input_box.val()});
}
cache.add(query, results);