From 90bc96b72aaeac949ebf861c765c12903ded3b09 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 21 Jun 2013 15:01:46 +0200 Subject: [PATCH] Fix tooltip + enhancement Adressed PR's comment Fix CSS issue --- component.json | 2 +- .../Requirements/BinariesRequirements.php | 1 + plugins/autoload.php | 7 +- plugins/services.php | 4 - .../admin/editusers_timelimit_sbas.html.twig | 12 ++- templates/web/admin/task.html.twig | 8 +- .../web/common/index_bootstrap.html.twig | 3 + templates/web/common/indexfloat.html.twig | 2 +- templates/web/lightbox/IE6/validate.html.twig | 5 - templates/web/prod/User/Add.html.twig | 16 +-- .../web/prod/actions/Bridge/index.html.twig | 44 +++++---- .../web/prod/actions/Property/index.html.twig | 2 +- templates/web/prod/index.html.twig | 40 +++----- templates/web/prod/templates/upload.html.twig | 2 +- templates/web/prod/upload/lazaret.html.twig | 6 +- templates/web/report/all_content.html.twig | 4 +- www/include/jquery.common.js | 1 + www/skins/admin/editusers.js | 10 +- www/skins/admin/users.js | 19 ++-- www/skins/client/jquery.p4client.1.0.js | 4 +- www/skins/common/main.css | 5 +- www/skins/prod/000000/prodcolor.css | 27 ++++-- www/skins/prod/959595/prodcolor.css | 30 ++++-- www/skins/prod/jquery.Dialog.js | 22 +++-- www/skins/prod/jquery.Feedback.js | 16 ++- www/skins/prod/jquery.WorkZone.js | 88 +++++++++-------- www/skins/prod/jquery.edit.js | 32 ++++-- www/skins/prod/jquery.main-prod.js | 97 +++++++++++++------ www/skins/report/report.js | 6 +- 29 files changed, 312 insertions(+), 203 deletions(-) diff --git a/component.json b/component.json index db15bab3cd..b5da53e6da 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "Phraseanet", "version": "3.8.0", "dependencies": { - "bootstrap": "~2.3.0", + "bootstrap": "~2.2.2", "jquery": "~1.8.3", "font-awesome": "~3.0.2", "underscore": "~1.4.4", diff --git a/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php b/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php index 30a9a3864c..71a9f909ba 100644 --- a/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php +++ b/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php @@ -150,6 +150,7 @@ class BinariesRequirements extends RequirementCollection implements RequirementI if (null !== $unoconv) { $output = null; + exec($unoconv . ' --version', $output); $data = sscanf($output[0], 'unoconv %d.%d'); $version = sprintf('%d.%d', $data[0], $data[1]); diff --git a/plugins/autoload.php b/plugins/autoload.php index 7c242765f2..e914fb7f97 100644 --- a/plugins/autoload.php +++ b/plugins/autoload.php @@ -1,10 +1,5 @@ diff --git a/templates/web/admin/task.html.twig b/templates/web/admin/task.html.twig index 4e5592f7a2..128d5759d2 100644 --- a/templates/web/admin/task.html.twig +++ b/templates/web/admin/task.html.twig @@ -157,9 +157,13 @@ }); {% if task.getInterfaceHTML() is empty %} - $("#taskTabs").tabs("disable", 0); + if ($("#taskTabs").tabs.data("ui-tabs")) { + $("#taskTabs").tabs("disable", 0); + } {% else %} - $("#taskTabs").tabs("active", 0); + if ($("#taskTabs").tabs.data("ui-tabs")) { + $("#taskTabs").tabs("active", 0); + } {% endif %} $("#taskResetCrashCounterButton").click(function() diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig index efe4ae28ba..8855230f4e 100644 --- a/templates/web/common/index_bootstrap.html.twig +++ b/templates/web/common/index_bootstrap.html.twig @@ -11,6 +11,9 @@ + {% endblock %} -{% block stylesheet %} - -{% endblock %} - {% block content %} {% set basket_element = basket.getElements().first() %}
diff --git a/templates/web/prod/User/Add.html.twig b/templates/web/prod/User/Add.html.twig index c0fa002d27..ad1909cfc1 100644 --- a/templates/web/prod/User/Add.html.twig +++ b/templates/web/prod/User/Add.html.twig @@ -66,16 +66,17 @@ $("#QuickAddUser button").button(); $("#QuickAddUser form").bind('submit', function(){ - - return false; }); $("#QuickAddUser form button.cancel").bind('click', function(){ + var dialog = $(this).closest('.ui-dialog-content'); + if (dialog.data("ui-dialog")) { + dialog.dialog('destroy'); + } - $(this).closest('.ui-dialog-content').dialog('destroy'); - $(this).closest('.ui-dialog-content').remove(); + dialog.remove(); - return false; + return false; }); $("#QuickAddUser form button.valid").bind('click', function(){ @@ -83,7 +84,10 @@ var $this = $(this); var callback = function(){ - $this.closest('.ui-dialog-content').dialog('destroy').remove() + var dialog = $this.closest('.ui-dialog-content'); + if (dialog.data("ui-dialog")) { + dialog.dialog('destroy').remove(); + } }; p4.Feedback.addUser($form, callback); diff --git a/templates/web/prod/actions/Bridge/index.html.twig b/templates/web/prod/actions/Bridge/index.html.twig index f3c19e4299..0bd92b6ea5 100644 --- a/templates/web/prod/actions/Bridge/index.html.twig +++ b/templates/web/prod/actions/Bridge/index.html.twig @@ -109,7 +109,9 @@ $(function() { $('.error_box, .notice_box', $panel).delay(10000).fadeOut(); $('.back_link', $panel).bind('click', function(){ - $('#pub_tabs').tabs('load',$('#pub_tabs').tabs('option', 'active')); + if ($('#pub_tabs').data("ui-tabs")) { + $('#pub_tabs').tabs('load',$('#pub_tabs').tabs('option', 'active')); + } return false; }); @@ -317,25 +319,26 @@ $(function() { pub_tabs.tabs({ beforeLoad: function( event, ui ) { - ui.tab.find('span').html("loading..."); + ui.tab.html_tab = ui.tab.find('span').html(); + ui.tab.find('span').html("{{ 'Loading'|trans }}..."); }, load: function(event, ui) { - ui.tab.find('span').empty(); - $panel = $(ui.panel); - $('.container-bridge', $panel).removeClass('loading'); - panel_load($panel); + ui.tab.find('span').empty().append(ui.tab.html_tab); + $panel = $(ui.panel); + $('.container-bridge', $panel).removeClass('loading'); + $panel.addClass("PNB"); + $panel.wrapInner("
"); + panel_load($panel); } - //@todo remove this as it is deprected, check where new tabs is added - , panelTemplate : '
' ,beforeActivate: function(event, ui) { - if($(ui.tab).hasClass('account')) - { - var container = $('.container-bridge', ui.panel); - container.empty(); - $('.container', ui.panel).addClass('loading'); - } + if($(ui.tab).hasClass('account')) + { + var container = $('.container-bridge', ui.panel); + container.empty(); + $('.container', ui.panel).addClass('loading'); + } } }).addClass('ui-tabs-vertical ui-helper-clearfix'); $('.ui-tabs-nav', pub_tabs).removeClass('ui-corner-all'); @@ -399,16 +402,23 @@ $(function() { $("li", pub_tabs).removeClass('ui-corner-top').addClass('ui-corner-left'); + $("#api_connexion").click(function(){ - container.dialog("close") + if (container.data("ui-dialog")) { + container.dialog("close"); + } }); {% if route.get_count_element_received() == 0 %} alert('{{ "Vous n\'avez selectionne aucun element"|trans|e('js') }}'); - container.dialog('close'); + if (container.data("ui-dialog")) { + container.dialog("close"); + } {% elseif route.get_count_actionable() == 0 %} alert('{{ "Vous n\'avez pas assez de droits sur les elements selectionnes"|trans|e('js') }}'); - container.dialog('close'); + if (container.data("ui-dialog")) { + container.dialog("close"); + } {% elseif route.get_count_actionable() != route.get_count_element_received() %} alert('{{ "Vous n\'avez pas assez de droits sur certains elements selectionnes"|trans|e('js') }}'); {% endif %} diff --git a/templates/web/prod/actions/Property/index.html.twig b/templates/web/prod/actions/Property/index.html.twig index 1076a0c30c..5df81f0931 100644 --- a/templates/web/prod/actions/Property/index.html.twig +++ b/templates/web/prod/actions/Property/index.html.twig @@ -143,7 +143,7 @@ ui.tab.data( "loaded", true ); }); - ui.tab.find('span').html("loading..."); + ui.tab.find('span').html("{{ 'Loading'|trans }}..."); }, load: function(event, ui) { diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 7db96a6748..29a7ee639d 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -75,27 +75,11 @@ @@ -171,7 +155,7 @@ {% endif %}
  • - +
  • @@ -826,7 +810,7 @@

    {% trans 'Theme' %}

    {% for color, file in css %}
     
    + onclick="setCss('{{color}}');" style="width:16px;height:16px;background-color:#{{ color }};"> 
    {% endfor %}
    @@ -1026,7 +1010,7 @@ function sessionactive(){ $.ajax({ type: "POST", - url: "/session/update/", + url: "{{ path('update_session') }}", dataType: "json", data: { module : 1, @@ -1048,14 +1032,14 @@ return; } - }) + }); }; function setCss(color) { $("#skinCss").attr("href","/include/minify/?f=skins/prod/"+color+"/prodcolor.css"); - $.post("prodFeedBack.php", { - action: "CSS", - color: color, + $.post("{{ path('save_pref') }}", { + prop: "css", + value: color, t: Math.random() }, function(data){ return; diff --git a/templates/web/prod/templates/upload.html.twig b/templates/web/prod/templates/upload.html.twig index 18f7e46090..81d4029b58 100644 --- a/templates/web/prod/templates/upload.html.twig +++ b/templates/web/prod/templates/upload.html.twig @@ -45,7 +45,7 @@ <%= heading %>
    <% _.each(reasons, function(reason) { %> -
    *<%= reason%>
    +
    *<%= reason %>
    <% }); %> diff --git a/templates/web/prod/upload/lazaret.html.twig b/templates/web/prod/upload/lazaret.html.twig index 9d61e8328a..cf168c90b3 100644 --- a/templates/web/prod/upload/lazaret.html.twig +++ b/templates/web/prod/upload/lazaret.html.twig @@ -95,7 +95,7 @@ }else{ var html = _.template($("#alert_error_tpl").html(), { - content:datas.message + content:data.message }); that.closest(".btn-group").before( html ); @@ -104,7 +104,7 @@ error: function(){ stopAjax(that); var html = _.template($("#alert_error_tpl").html(), { - content:datas.message + content:language.errorAjaxRequest }); that.closest(".btn-group").before( html ); @@ -138,7 +138,7 @@ that.closest(".wrapper-item").remove(); }else{ var html = _.template($("#alert_error_tpl").html(), { - content:datas.message + content:data.message }); that.closest(".thumbnail").append(html); } diff --git a/templates/web/report/all_content.html.twig b/templates/web/report/all_content.html.twig index f34abce68b..f76d181448 100644 --- a/templates/web/report/all_content.html.twig +++ b/templates/web/report/all_content.html.twig @@ -1,7 +1,7 @@ {% extends "common/index_bootstrap.html.twig" %} {% block stylesheet %} - + {% endblock stylesheet %} @@ -38,8 +38,6 @@ - -