diff --git a/component.json b/component.json index 58b5ae64f3..db15bab3cd 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "Phraseanet", "version": "3.8.0", "dependencies": { - "bootstrap": "~2.2.2", + "bootstrap": "~2.3.0", "jquery": "~1.8.3", "font-awesome": "~3.0.2", "underscore": "~1.4.4", @@ -11,8 +11,7 @@ "json3" : "3.2.4", "humane-js": "~3.0.6", "qunit": "https://github.com/jquery/qunit.git#1.11.0", - "mustache": "~0.7.2", - "jquery-file-upload": "https://github.com/blueimp/jQuery-File-Upload/archive/75d11179fd9c248c061c8eb428782bb556c8db0a.zip", + "jquery-file-upload": "~8.3.2", "blueimp-load-image": "latest", "requirejs" : "~2.1", "backbone-amd": "~1.0", diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index 25fa5da095..a5ffb7f4db 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -40,7 +40,6 @@ use Alchemy\Phrasea\Controller\Prod\Feed; use Alchemy\Phrasea\Controller\Prod\Language; use Alchemy\Phrasea\Controller\Prod\Lazaret; use Alchemy\Phrasea\Controller\Prod\MoveCollection; -use Alchemy\Phrasea\Controller\Prod\MustacheLoader; use Alchemy\Phrasea\Controller\Prod\Order; use Alchemy\Phrasea\Controller\Prod\Printer; use Alchemy\Phrasea\Controller\Prod\Push; @@ -715,7 +714,6 @@ class Application extends SilexApplication $this->mount('/prod/story', new Story()); $this->mount('/prod/WorkZone', new WorkZone()); $this->mount('/prod/lists', new UsrLists()); - $this->mount('/prod/MustacheLoader', new MustacheLoader()); $this->mount('/prod/records/', new Records()); $this->mount('/prod/records/edit', new Edit()); $this->mount('/prod/records/property', new Property()); diff --git a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php index 59400b8202..ef0ecde5db 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php @@ -97,7 +97,7 @@ class TaskManager implements ControllerProviderInterface return $app->redirectPath('admin_tasks_scheduler_log'); } - return $app->stream(function() use ($finder) { + return $app->stream(function() use ($finder, $app) { foreach ($finder->getIterator() as $file) { printf("

%s\n", $file->getRealPath()); printf(" path('admin_tasks_scheduler_log', array('clr' => $file->getFilename()))."\">%s" diff --git a/lib/Alchemy/Phrasea/Controller/Minifier.php b/lib/Alchemy/Phrasea/Controller/Minifier.php index 7f2ea50735..b037402fdc 100644 --- a/lib/Alchemy/Phrasea/Controller/Minifier.php +++ b/lib/Alchemy/Phrasea/Controller/Minifier.php @@ -47,6 +47,8 @@ class Minifier implements ControllerProviderInterface if ($app['debug']) { // may cause js errors $min_serveOptions['debug'] = false; + // disallow minification instead + $min_serveOptions['minApp']['noMinPattern'] = '#\.(?:js|css)$#i'; $min_serveOptions['maxAge'] = 0; } else { $min_serveOptions['debug'] = false; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/MustacheLoader.php b/lib/Alchemy/Phrasea/Controller/Prod/MustacheLoader.php deleted file mode 100644 index ac7fb7a018..0000000000 --- a/lib/Alchemy/Phrasea/Controller/Prod/MustacheLoader.php +++ /dev/null @@ -1,50 +0,0 @@ -get('/', function(Application $app, Request $request) { - $template_name = $request->query->get('template'); - - if (!preg_match('/^[a-zA-Z0-9-_]+$/', $template_name)) { - throw new BadRequestHttpException('Wrong template name : ' . $template_name); - } - - $template_path = realpath(__DIR__ . '/../../../../../templates/web/Mustache/Prod/' . $template_name . '.Mustache.html'); - - if (!file_exists($template_path)) { - throw new NotFoundHttpException('Template does not exists : ' . $template_path); - } - - return new \Symfony\Component\HttpFoundation\Response(file_get_contents($template_path)); - }); - - return $controllers; - } -} diff --git a/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php b/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php index 71a9f909ba..30a9a3864c 100644 --- a/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php +++ b/lib/Alchemy/Phrasea/Setup/Requirements/BinariesRequirements.php @@ -150,7 +150,6 @@ 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/lib/Doctrine/Entities/UsrList.php b/lib/Doctrine/Entities/UsrList.php index f3d27cdc04..06dd1e7d98 100644 --- a/lib/Doctrine/Entities/UsrList.php +++ b/lib/Doctrine/Entities/UsrList.php @@ -238,7 +238,7 @@ class UsrList public function has(\User_Adapter $user, Application $app) { return $this->entries->exists( - function($key, $entry) use ($user) { + function($key, $entry) use ($user, $app) { return $entry->getUser($app)->get_id() === $user->get_id(); } ); diff --git a/lib/classes/module/console/systemTemplateGenerator.php b/lib/classes/module/console/systemTemplateGenerator.php index 398e05171e..105f5c6c79 100644 --- a/lib/classes/module/console/systemTemplateGenerator.php +++ b/lib/classes/module/console/systemTemplateGenerator.php @@ -50,7 +50,7 @@ class module_console_systemTemplateGenerator extends Command foreach ($tplDirs as $tplDir) { $this->container['twig.loader.filesystem']->setPaths(array($tplDir)); $finder = new Finder(); - foreach ($finder->files()->in(array($tplDir))->exclude('Mustache') as $file) { + foreach ($finder->files()->in(array($tplDir)) as $file) { try { $this->container['twig']->loadTemplate(str_replace($tplDir, '', $file->getPathname())); $output->writeln('' . $file . ''); diff --git a/lib/conf.d/minifyGroupsConfig.php b/lib/conf.d/minifyGroupsConfig.php index e9e8c8f5af..1eda967286 100644 --- a/lib/conf.d/minifyGroupsConfig.php +++ b/lib/conf.d/minifyGroupsConfig.php @@ -21,7 +21,7 @@ $groups = array( ), 'client' => array( '//include/jslibs/swfobject/swfobject.js' - , '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + , '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//skins/geonames/geonames.js' , '//include/jslibs/jquery.cookie.js' , '//include/jquery.common.js' @@ -36,10 +36,10 @@ $groups = array( , '//include/jslibs/jquery.contextmenu_scroll.js'), 'admin' => array( '//assets/modernizr/modernizr.js' - , '//include/jslibs/jquery-ui-1.8.24.js' + , '//assets/underscore-amd/underscore.js' , '//include/jslibs/jquery.cookie.js' , '//include/jslibs/jquery-treeview/jquery.treeview.js' - , '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + , '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//include/jquery.kb-event.js' , '//skins/admin/users.js' , '//skins/admin/editusers.js' @@ -53,7 +53,7 @@ $groups = array( , '//assets/jquery-file-upload/js/jquery.fileupload.js' ), 'report' => array( - '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//include/jslibs/jquery.cookie.js' , '//include/jquery.common.js' , '//include/jquery.tooltip.js' @@ -65,19 +65,19 @@ $groups = array( , '//skins/report/report.js' ), 'modalBox' => array( - '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' ), 'prod' => array( '//include/jslibs/swfobject/swfobject.js' + , '//assets/underscore-amd/underscore.js' , '//include/jslibs/json2.js' , '//include/jslibs/colorpicker/js/colorpicker.js' , '//include/jslibs/jquery.mousewheel.js' , '//include/jslibs/jquery.lazyload/jquery.lazyload.1.8.1.js' - , '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + , '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//include/jslibs/jquery.cookie.js' , '//include/jquery.common.js' , '//assets/humane-js/humane.js' - , '//assets/mustache/mustache.js' , '//assets/blueimp-load-image/load-image.js' , '//assets/jquery-file-upload/js/vendor/jquery.ui.widget.js' , '//assets/jquery-file-upload/js/jquery.iframe-transport.js' @@ -88,7 +88,6 @@ $groups = array( , '//include/js/jquery.Selection.js' , '//include/js/jquery.Edit.js' , '//include/js/jquery.lists.js' - , '//skins/prod/jquery.Mustache.js' , '//skins/prod/jquery.Prod.js' , '//skins/prod/jquery.Dialog.js' , '//skins/prod/jquery.Feedback.js' @@ -124,7 +123,7 @@ $groups = array( , '//include/jquery.tooltip.js' , '//include/jslibs/swfobject/swfobject.js' , '//skins/geonames/geonames.js' - , '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + , '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//include/jslibs/jquery.cookie.js' , '//include/jslibs/jquery.contextmenu_scroll.js' , '//include/jquery.common.js' @@ -136,7 +135,7 @@ $groups = array( , '//include/jquery.tooltip.js' , '//include/jslibs/swfobject/swfobject.js' , '//skins/geonames/geonames.js' - , '//include/jslibs/jquery-ui-1.8.17/jquery-ui-i18n.js' + , '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js' , '//include/jslibs/jquery.cookie.js' , '//include/jslibs/jquery.contextmenu_scroll.js' , '//include/jquery.common.js' diff --git a/plugins/autoload.php b/plugins/autoload.php index e914fb7f97..7c242765f2 100644 --- a/plugins/autoload.php +++ b/plugins/autoload.php @@ -1,5 +1,10 @@ - - {{ content }} - diff --git a/templates/web/Mustache/Prod/Alert-Success.Mustache.html b/templates/web/Mustache/Prod/Alert-Success.Mustache.html deleted file mode 100644 index 50d3e7f2f3..0000000000 --- a/templates/web/Mustache/Prod/Alert-Success.Mustache.html +++ /dev/null @@ -1,4 +0,0 @@ -
- - {{ content }} -
diff --git a/templates/web/Mustache/Prod/Download-Finish.Mustache.html b/templates/web/Mustache/Prod/Download-Finish.Mustache.html deleted file mode 100644 index 2c0a17bf58..0000000000 --- a/templates/web/Mustache/Prod/Download-Finish.Mustache.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ heading }} -
-{{#reasons}} -* {{.}}
-{{/reasons}} diff --git a/templates/web/Mustache/Prod/Download-Items.Mustache.html b/templates/web/Mustache/Prod/Download-Items.Mustache.html deleted file mode 100644 index 537fc0c5a9..0000000000 --- a/templates/web/Mustache/Prod/Download-Items.Mustache.html +++ /dev/null @@ -1,14 +0,0 @@ -
  • -
    -
    -
    -

    {{ name }}

    -
    -
    -
    -

    -

    - -
    -
    -
  • diff --git a/templates/web/Mustache/Prod/Feedback-Badge.Mustache.html b/templates/web/Mustache/Prod/Feedback-Badge.Mustache.html deleted file mode 100644 index 392e2ccf43..0000000000 --- a/templates/web/Mustache/Prod/Feedback-Badge.Mustache.html +++ /dev/null @@ -1,47 +0,0 @@ -
    - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - -
    - {{ user.display_name }} -
    - {{ user.subtitle }} -
    - - - - - - - - - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html b/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html deleted file mode 100644 index 68c4d00f27..0000000000 --- a/templates/web/Mustache/Prod/Feedback-SendForm.Mustache.html +++ /dev/null @@ -1,28 +0,0 @@ -
    - -
    - - -
    -
    - - -
    -
    - -
    -
    diff --git a/templates/web/Mustache/Prod/List-Badge.Mustache.html b/templates/web/Mustache/Prod/List-Badge.Mustache.html deleted file mode 100644 index aa71d2f9a1..0000000000 --- a/templates/web/Mustache/Prod/List-Badge.Mustache.html +++ /dev/null @@ -1,29 +0,0 @@ -
    - - - - - - - - - -
    - - -
    - - - - - - - -
    - {{ display_name }} -
    - {{ subtitle }} -
    -
    -
    -
    \ No newline at end of file diff --git a/templates/web/Mustache/Prod/List-List-Item.Mustache.html b/templates/web/Mustache/Prod/List-List-Item.Mustache.html deleted file mode 100644 index c02bfc3ed1..0000000000 --- a/templates/web/Mustache/Prod/List-List-Item.Mustache.html +++ /dev/null @@ -1,27 +0,0 @@ -
  • - - - - - - -
    - - -
    - - - - - - - -
    - {{ name }} -
    - {{ length }} elements -
    -
    -
    -
    -
  • \ No newline at end of file diff --git a/templates/web/Mustache/Prod/List-User-Item.Mustache.html b/templates/web/Mustache/Prod/List-User-Item.Mustache.html deleted file mode 100644 index e05dd4d9d6..0000000000 --- a/templates/web/Mustache/Prod/List-User-Item.Mustache.html +++ /dev/null @@ -1,27 +0,0 @@ -
  • - - - - - - -
    - - -
    - - - - - - - -
    - {{ display_name }} -
    - {{ subtitle }} -
    -
    -
    -
    -
  • \ No newline at end of file diff --git a/templates/web/Mustache/Prod/ListEditor-DialogAdd.Mustache.html b/templates/web/Mustache/Prod/ListEditor-DialogAdd.Mustache.html deleted file mode 100644 index b65d7e5e7f..0000000000 --- a/templates/web/Mustache/Prod/ListEditor-DialogAdd.Mustache.html +++ /dev/null @@ -1,4 +0,0 @@ -
    - - -
    \ No newline at end of file diff --git a/templates/web/Mustache/Prod/ListEditor-DialogDelete.Mustache.html b/templates/web/Mustache/Prod/ListEditor-DialogDelete.Mustache.html deleted file mode 100644 index 52e664cb06..0000000000 --- a/templates/web/Mustache/Prod/ListEditor-DialogDelete.Mustache.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - {{sureToRemoveList}} -

    \ No newline at end of file diff --git a/templates/web/Mustache/Prod/Push-Badge.Mustache.html b/templates/web/Mustache/Prod/Push-Badge.Mustache.html deleted file mode 100644 index 6f9531254c..0000000000 --- a/templates/web/Mustache/Prod/Push-Badge.Mustache.html +++ /dev/null @@ -1,37 +0,0 @@ -
    - - - - - - - - - -
    - - -
    - - - - - - - - - - - -
    - {{ user.display_name }} -
    - {{ user.subtitle }} -
    - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/templates/web/Mustache/Prod/Upload-Items-Error.Mustache.html b/templates/web/Mustache/Prod/Upload-Items-Error.Mustache.html deleted file mode 100644 index 701fbd8990..0000000000 --- a/templates/web/Mustache/Prod/Upload-Items-Error.Mustache.html +++ /dev/null @@ -1,9 +0,0 @@ -
  • -
    -

    {{ name }}

    - -
    -

    {{ error }}

    -
    -
    -
  • diff --git a/templates/web/Mustache/Prod/Upload-Items.Mustache.html b/templates/web/Mustache/Prod/Upload-Items.Mustache.html deleted file mode 100644 index 15969fc215..0000000000 --- a/templates/web/Mustache/Prod/Upload-Items.Mustache.html +++ /dev/null @@ -1,11 +0,0 @@ -
  • -
    -
    -
    -

    {{ name }}

    -

    {{ size }}, {{ type }}

    - - -
    -
    -
  • diff --git a/templates/web/admin/collection/collection.html.twig b/templates/web/admin/collection/collection.html.twig index 57124911be..0cf23bed39 100644 --- a/templates/web/admin/collection/collection.html.twig +++ b/templates/web/admin/collection/collection.html.twig @@ -237,12 +237,12 @@ $('input[name="admins[]"]:last', form).val(ui.item.id); form.submit(); } - }).data( "autocomplete" )._renderItem = function( ul, item ) { + }).data( "ui-autocomplete" )._renderItem = function( ul, item ) { var email = item.email ? '
    '+item.email : ''; - var login = item.login != item.name ? " ("+ item.login +")" : ''; + var login = item.login !== item.name ? " ("+ item.login +")" : ''; return $( "
  • " ) - .data( "item.autocomplete", item ) + .data( "ui-autocomplete-item", item ) .append( "" + item.name + login + email + "" ) .appendTo( ul ); }; @@ -260,15 +260,10 @@ pub_wm: $this.val() }, success: function(datas) { - if(datas.success) { - p4.Mustache.Render('Alert-Success', {content:datas.msg}, function(html){ - $this.closest('.action-block').prepend(html); - }); - } else { - p4.Mustache.Render('Alert-Error', {content:datas.msg}, function(html){ - $this.closest('.action-block').prepend(html); - }); - } + var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { + content:datas.msg + }); + $this.closest('.action-block').prepend(html); } }); }); diff --git a/templates/web/admin/collection/reorder.html.twig b/templates/web/admin/collection/reorder.html.twig index bbe74ff9a3..49a4649da1 100644 --- a/templates/web/admin/collection/reorder.html.twig +++ b/templates/web/admin/collection/reorder.html.twig @@ -37,7 +37,7 @@ }); $("#natcase-reorder").bind('click', function(){ - select.find('option').sort(natCaseSort).appendTo(select) + select.find('option').sort(natCaseSort).appendTo(select); }); upButton.bind('click', function(){ @@ -67,9 +67,10 @@ $this.attr('disabled', true); }, success : function(datas) { - p4.Mustache.Render('Alert-Success', function,(html) { - $('#table-order').insertBefore(html); + var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { + content:datas.msg }); + $('#table-order').insertBefore(html); }, complete : function() { $this.attr('disabled', false); diff --git a/templates/web/admin/dashboard.html.twig b/templates/web/admin/dashboard.html.twig index 6bbb8e2e58..9efa7f4960 100644 --- a/templates/web/admin/dashboard.html.twig +++ b/templates/web/admin/dashboard.html.twig @@ -72,12 +72,12 @@ $('input.new[name="admins[]"]', form).val(ui.item.id); form.submit(); } - }).data( "autocomplete" )._renderItem = function( ul, item ) { + }).data( "ui-autocomplete" )._renderItem = function( ul, item ) { var email = item.email ? '
    '+item.email : ''; var login = item.login != item.name ? " ("+ item.login +")" : ''; return $( "
  • " ) - .data( "item.autocomplete", item ) + .data( "ui-autocomplete-item", item ) .append( "" + item.name + login + email + "" ) .appendTo( ul ); }; diff --git a/templates/web/admin/databox/cgus.html.twig b/templates/web/admin/databox/cgus.html.twig index 94d6b1bd7e..d09f74a651 100644 --- a/templates/web/admin/databox/cgus.html.twig +++ b/templates/web/admin/databox/cgus.html.twig @@ -35,7 +35,7 @@ $(document).ready(function(){ $('#tabs').tabs({ - selected:$("#tabs ul li").index($('#tabs ul li.current')) + active:$("#tabs ul li").index($('#tabs ul li.current')) }); {#tinyMCE.init({ diff --git a/templates/web/admin/editusers_timelimit.html.twig b/templates/web/admin/editusers_timelimit.html.twig index 16845fe61d..d628890fc9 100644 --- a/templates/web/admin/editusers_timelimit.html.twig +++ b/templates/web/admin/editusers_timelimit.html.twig @@ -47,9 +47,8 @@ function datePicker() changeYear: true, dateFormat:'yy-mm-dd', numberOfMonths: 3, - onSelect: function(selectedDate) { + onSelect: function(selectedDate, instance) { var option = $(this).hasClass("dmin") ? "minDate" : "maxDate"; - var instance = $(this).data("datepicker"); var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); $(dates).not(':hidden').not(this).datepicker("option", option, date); } @@ -60,9 +59,8 @@ function datePicker() changeYear: true, dateFormat:'yy-mm-dd', numberOfMonths: 3, - onSelect: function(selectedDate) { + onSelect: function(selectedDate, instance) { var option = $(this).hasClass("dmin") ? "minDate" : "maxDate"; - var instance = $(this).data("datepicker"); var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); $(dates).not(':hidden').not(this).datepicker("option", option, date); } diff --git a/templates/web/admin/editusers_timelimit_sbas.html.twig b/templates/web/admin/editusers_timelimit_sbas.html.twig index 8e266a3b20..45eaac6b9d 100644 --- a/templates/web/admin/editusers_timelimit_sbas.html.twig +++ b/templates/web/admin/editusers_timelimit_sbas.html.twig @@ -43,9 +43,8 @@ function datePicker() changeYear: true, dateFormat:'yy-mm-dd', numberOfMonths: 3, - onSelect: function(selectedDate) { + onSelect: function(selectedDate, instance) { var option = $(this).hasClass("dmin") ? "minDate" : "maxDate"; - var instance = $(this).data("datepicker"); var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); $(dates).not(':hidden').not(this).datepicker("option", option, date); } @@ -56,9 +55,8 @@ function datePicker() changeYear: true, dateFormat:'yy-mm-dd', numberOfMonths: 3, - onSelect: function(selectedDate) { + onSelect: function(selectedDate, instance) { var option = $(this).hasClass("dmin") ? "minDate" : "maxDate"; - var instance = $(this).data("datepicker"); var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); $(dates).not(':hidden').not(this).datepicker("option", option, date); } diff --git a/templates/web/admin/index.html.twig b/templates/web/admin/index.html.twig index 538bd1873d..62439a9141 100644 --- a/templates/web/admin/index.html.twig +++ b/templates/web/admin/index.html.twig @@ -8,11 +8,12 @@ {% endblock %} {% block stylesheet %} - + {% endblock %} {% block javascript %} + {% include "common/templates.html.twig" %} - + - + diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index 7abef1b4a1..cf8f10821a 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -592,8 +592,10 @@ $(document).ready(function(){ var dialog = p4.Dialog.get(1); - - $('.tabs', dialog.getDomElement()).tabs('select',1); + var tabs = $('.tabs', dialog.getDomElement()); + if (tabs.data('ui-tabs')) { + tabs.tabs('active',1); + } $('a.TOUview').bind('click', function(){ var options = { @@ -651,7 +653,11 @@ $('input[name="obj[]"][value="'+$(n).val()+'"]', $('#sendmail')).attr('checked', true); }); $('input[name="destmail"]', $('#sendmail')).val("{{app['authentication'].getUser().get_email()}}"); - $('.tabs', dialog.getDomElement()).tabs('select',1); + + var tabs = $('.tabs', dialog.getDomElement()); + if (tabs.data('ui-tabs')) { + tabs.tabs('active',1); + } } return; diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig index 91d86be92a..efe4ae28ba 100644 --- a/templates/web/common/index_bootstrap.html.twig +++ b/templates/web/common/index_bootstrap.html.twig @@ -4,13 +4,18 @@ {% if local_title is defined%}{{local_title}} | {% endif %}{{ app['phraseanet.registry'].get('GV_homeTitle') }} {% if module_name is defined %} - {{ module_name }} {% endif %} + + - + {% block stylesheet %}{% endblock %} {% block icon %}{% endblock %} {% block rss %}{% endblock %} diff --git a/templates/web/common/templates.html.twig b/templates/web/common/templates.html.twig new file mode 100644 index 0000000000..2d1dda571a --- /dev/null +++ b/templates/web/common/templates.html.twig @@ -0,0 +1,13 @@ + + + diff --git a/templates/web/lightbox/IE6/feed.html.twig b/templates/web/lightbox/IE6/feed.html.twig index 26be723bf2..1d01d3b115 100644 --- a/templates/web/lightbox/IE6/feed.html.twig +++ b/templates/web/lightbox/IE6/feed.html.twig @@ -4,13 +4,7 @@ {% import 'common/caption_templates/preview.html.twig' as caption %} {% block javascript %} - - - -{% endblock %} - -{% block stylesheet %} - + {% endblock %} {% block content %} diff --git a/templates/web/lightbox/IE6/index.html.twig b/templates/web/lightbox/IE6/index.html.twig index ad1cf3fb6a..c0a5118f0e 100644 --- a/templates/web/lightbox/IE6/index.html.twig +++ b/templates/web/lightbox/IE6/index.html.twig @@ -3,13 +3,11 @@ {% import 'common/thumbnail.html.twig' as thumbnail %} {% block javascript %} - - - + {% endblock %} {% block stylesheet %} - + {% endblock %} {% block icon %} diff --git a/templates/web/lightbox/IE6/validate.html.twig b/templates/web/lightbox/IE6/validate.html.twig index da8e6b1df2..3400be898c 100644 --- a/templates/web/lightbox/IE6/validate.html.twig +++ b/templates/web/lightbox/IE6/validate.html.twig @@ -4,14 +4,12 @@ {% import 'common/caption_templates/preview.html.twig' as caption %} {% block javascript %} - - {% endblock %} {% block stylesheet %} + href="{{ path('minifier', { 'f' : 'include/jslibs/jquery-ui-1.10.3/css/ui-lightness/jquery-ui-1.10.3.custom.css,skins/lightbox/lightboxie6.css' }) }}" media="screen"/> {% endblock %} {% block content %} diff --git a/templates/web/lightbox/feed.html.twig b/templates/web/lightbox/feed.html.twig index 6b8e59ee67..09f89cc845 100644 --- a/templates/web/lightbox/feed.html.twig +++ b/templates/web/lightbox/feed.html.twig @@ -4,14 +4,12 @@ {% import 'common/caption_templates/preview.html.twig' as caption %} {% block javascript %} - - {% endblock %} {% block stylesheet %} + href="{{ path('minifier', { 'f' : 'skins/lightbox/lightbox.css' }) }}" media="screen"/> {% endblock %} diff --git a/templates/web/lightbox/index.html.twig b/templates/web/lightbox/index.html.twig index 54a259f9a3..96202aede6 100644 --- a/templates/web/lightbox/index.html.twig +++ b/templates/web/lightbox/index.html.twig @@ -3,14 +3,12 @@ {% import 'common/thumbnail.html.twig' as thumbnail %} {% block javascript %} - - {% endblock %} {% block stylesheet %} + href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.contextmenu.css,skins/lightbox/lightbox.css' }) }}" media="screen"/> {% endblock %} {% block icon %} diff --git a/templates/web/lightbox/validate.html.twig b/templates/web/lightbox/validate.html.twig index fa8bc33a19..64e5fa61dc 100644 --- a/templates/web/lightbox/validate.html.twig +++ b/templates/web/lightbox/validate.html.twig @@ -4,14 +4,12 @@ {% import 'common/caption_templates/preview.html.twig' as caption %} {% block javascript %} - - {% endblock %} {% block stylesheet %} + href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.contextmenu.css,skins/lightbox/lightbox.css' }) }}" media="screen"/> {% endblock %} diff --git a/templates/web/overview.html.twig b/templates/web/overview.html.twig index b344332a12..61aa6523cd 100644 --- a/templates/web/overview.html.twig +++ b/templates/web/overview.html.twig @@ -61,7 +61,7 @@ {% endblock %} {% block javascript %} - + diff --git a/templates/web/prod/actions/Feedback/list.html.twig b/templates/web/prod/actions/Feedback/list.html.twig index a356883996..544bc6b483 100644 --- a/templates/web/prod/actions/Feedback/list.html.twig +++ b/templates/web/prod/actions/Feedback/list.html.twig @@ -6,7 +6,7 @@ {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('\\Entities\\UsrListOwner::ROLE_EDITOR') %} -
    + @@ -55,7 +55,7 @@ {% if list.getOwner(app['authentication'].getUser(), app).getRole() >= constant('\\Entities\\UsrListOwner::ROLE_EDITOR') %}