aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2014-06-23 20:08:45 +0000
committerflop25 <flop25@piwigo.org>2014-06-23 20:08:45 +0000
commitba5fcfda0f1cb21d84c1f6d1ca3b92a4502eb014 (patch)
tree9026c9714ba0af12b9e9b8025b3227275c0b4cc8
parent517761cc8e774ddaa27966a4aa052e2c85c9b919 (diff)
adjustments for 2.7
js updated to 9.0.3 git-svn-id: http://piwigo.org/svn/trunk@28775 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--plugins/TakeATour/js/custom-bootstrap-tour-standalone.js72
-rw-r--r--plugins/TakeATour/js/custom.patch43
-rw-r--r--plugins/TakeATour/language/en_UK/plugin.lang.php18
-rw-r--r--plugins/TakeATour/tours/first_contact/tour.tpl25
4 files changed, 129 insertions, 29 deletions
diff --git a/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js b/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js
index 23c052af6..70a155a53 100644
--- a/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js
+++ b/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js
@@ -1,5 +1,5 @@
/* ===========================================================
-# bootstrap-tour - v0.9.0
+# bootstrap-tour - v0.9.3
# http://bootstraptour.com
# ==============================================================
# Copyright 2012-2013 Ulrich Sossou
@@ -17,7 +17,56 @@
# limitations under the License.
*/
/* ========================================================================
- * Bootstrap: tooltip.js v3.1.0
+ * Bootstrap: transition.js v3.1.1
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd',
+ 'MozTransition' : 'transitionend',
+ 'OTransition' : 'oTransitionEnd otransitionend',
+ 'transition' : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false, $el = this
+ $(this).one($.support.transition.end, function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.1.1
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@@ -417,7 +466,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: popover.js v3.1.0
+ * Bootstrap: popover.js v3.1.1
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -532,12 +581,18 @@
document = window.document;
Tour = (function() {
function Tour(options) {
+ var storage;
+ try {
+ storage = window.localStorage;
+ } catch (_error) {
+ storage = false;
+ }
this._options = $.extend({
name: "tour",
steps: [],
container: "body",
keyboard: true,
- storage: window.localStorage,
+ storage: storage,
debug: false,
backdrop: false,
redirect: true,
@@ -695,7 +750,6 @@
Tour.prototype.restart = function() {
this._removeState("current_step");
this._removeState("end");
- this.setCurrentStep(0);
return this.start();
};
@@ -830,6 +884,9 @@
_this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
}
_this._scrollIntoView(step.element, function() {
+ if (_this.getCurrentStep() !== i) {
+ return;
+ }
if ((step.element != null) && step.backdrop) {
_this._showOverlayElement(step.element);
}
@@ -967,6 +1024,7 @@
Tour.prototype._showPopover = function(step, i) {
var $element, $navigation, $template, $tip, isOrphan, options;
+ $(".tour-" + this._options.name).remove();
options = $.extend({}, this._options);
$template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template);
$navigation = $template.find(".popover-navigation");
@@ -982,7 +1040,7 @@
if (step.options) {
$.extend(options, step.options);
}
- if (step.reflex & !isOrphan) {
+ if (step.reflex && !isOrphan) {
$element.css("cursor", "pointer").on("click.tour-" + this._options.name, (function(_this) {
return function() {
if (_this._isLast()) {
@@ -1194,9 +1252,11 @@
};
Tour.prototype._hideBackground = function() {
+ if (this.backdrop) {
this.backdrop.remove();
this.backdrop.overlay = null;
return this.backdrop.backgroundShown = false;
+ }
};
Tour.prototype._showOverlayElement = function(element) {
diff --git a/plugins/TakeATour/js/custom.patch b/plugins/TakeATour/js/custom.patch
new file mode 100644
index 000000000..0ad5f0b5c
--- /dev/null
+++ b/plugins/TakeATour/js/custom.patch
@@ -0,0 +1,43 @@
+--- E:/Program Files/EasyPHP/www/SITE/sandbox/pwg_test/piwigo_trunk/plugins/TakeATour/js/903.js Mon Jun 23 21:44:59 2014
++++ E:/Program Files/EasyPHP/www/SITE/sandbox/pwg_test/piwigo_trunk/plugins/TakeATour/js/custom-bootstrap-tour-standalone.js Sun Apr 13 19:05:42 2014
+@@ -849,9 +849,15 @@
+ return step.path;
+ }
+ }).call(_this);
+- current_path = [document.location.pathname, document.location.hash].join("");
++ current_path = document.location.href;
+ if (_this._isRedirect(path, current_path)) {
++ if (toString.call(path) === "[object RegExp]") {
+ _this._redirect(step, path);
++ }
++ else {
++ path = document.location.protocol+'//'+path;
++ _this._redirect(step, path);
++ }
+ return;
+ }
+ if (_this._isOrphan(step)) {
+@@ -866,6 +872,14 @@
+ }
+ _this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
+ }
++ if (step.title === "" & step.content === "") {
++ if (skipToPrevious) {
++ _this._showPrevStep();
++ } else {
++ _this._showNextStep();
++ }
++ return;
++ }
+ if (step.backdrop) {
+ _this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
+ }
+@@ -988,7 +1002,7 @@
+ };
+
+ Tour.prototype._isRedirect = function(path, currentPath) {
+- return (path != null) && path !== "" && (({}.toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || ({}.toString.call(path) === "[object String]" && path.replace(/\?.*$/, "").replace(/\/?$/, "") !== currentPath.replace(/\/?$/, "")));
++ return (path != null) && path !== "" && ((toString.call(path) === "[object RegExp]" && !path.test(currentPath)) || (toString.call(path) === "[object String]" && path !== currentPath.replace("http://", "").replace("https://", "")));
+ };
+
+ Tour.prototype._redirect = function(step, path) {
diff --git a/plugins/TakeATour/language/en_UK/plugin.lang.php b/plugins/TakeATour/language/en_UK/plugin.lang.php
index 527baacbe..095b9580a 100644
--- a/plugins/TakeATour/language/en_UK/plugin.lang.php
+++ b/plugins/TakeATour/language/en_UK/plugin.lang.php
@@ -18,13 +18,13 @@ $lang['first_contact_stp3'] = 'This first tab is where you add photos directly f
$lang['first_contact_title4'] = 'Lets add photo!';
$lang['first_contact_stp4'] = 'First choose an album; create one if there is no album yet.';
$lang['first_contact_title5'] = '';
-$lang['first_contact_stp5'] = 'Then click the button to select photos to send from your computer';
+$lang['first_contact_stp5'] = 'Then click the button to select photos to send from your computer, or just drag and drop files in the zone above.';
$lang['first_contact_title6'] = '';
-$lang['first_contact_stp6'] = 'You see that photos are being listed. Add at least 2 pictures and when you\'re ready click the button Start Upload';
+$lang['first_contact_stp6'] = 'You see that photos are being listed. Add pictures and when you\'re ready click the button Start Upload';
$lang['first_contact_title7'] = '';
-$lang['first_contact_stp7'] = 'Here a summary of your uploaded pictures. See that Piwigo has generated itself the thumbnails. You can know add more photos with the link at the bottom, edit the properties of a picture by clicking on it, or click to manage all the uploaded pictures in the Batch Manager...';
+$lang['first_contact_stp7'] = 'Here a summary of your uploaded pictures. See that Piwigo has generated itself the thumbnails. You can now click to manage all the uploaded pictures in the Batch Manager, edit the properties of a picture by clicking on it or add more photos...';
$lang['first_contact_title8'] = '';
-$lang['first_contact_stp8'] = 'Let\'s edit them! Click on the link. If you don\'t see it click Prev to add at least 2 photos.';
+$lang['first_contact_stp8'] = 'Let\'s edit them! Click on the link.';
$lang['first_contact_title9'] = 'The Batch Manager';
$lang['first_contact_stp9'] = 'You are know in the Batch Manager, where you can batch edit multiple pictures. Here the Caddy is set as a filter because we comes from the upload result page.';
$lang['first_contact_title10'] = '';
@@ -44,7 +44,7 @@ $lang['first_contact_stp16'] = 'here to add or remove the photo from albums. The
$lang['first_contact_title17'] = '';
$lang['first_contact_stp17'] = 'and here to set the photo as a picture representative of an album. So you can set as a representative of a public album, a photo in a private album, which is ideal to set custom thumbnails for albums but the user won\'t see those pictures inside those albums. Like setting a portrait of someone as representative, for an album which contains photos of nature; it would be weird to see that photo of the man/woman among trees or animals.';
$lang['first_contact_title18'] = 'Manage albums';
-$lang['first_contact_stp18'] = 'That previous example was just a small overview of tricks and how powerful Piwigo is. So I\'ve told about private albums, but how can we manage albums? Click On album->Manage or hit Next';
+$lang['first_contact_stp18'] = 'That previous example was just a small overview of tricks and how powerful Piwigo is. So I\'ve told about private albums, but how can we manage albums? Click <em>On album » Manage</em> or hit Next';
$lang['first_contact_title19'] = 'Manage Albums';
$lang['first_contact_stp19'] = 'Here are listed all the \'top\' albums, the ones at the root of your gallery. If you see an album with a dashed background, it\'s an real physical album from a FTP synchronisation, which can\'t be moved or deleted from here. The others albums are called virtual albums.';
$lang['first_contact_stp19_b'] = 'All the albums are called \'virtual albums\'. Here are listed all the \'top\' albums, the ones at the root of your gallery.';
@@ -59,14 +59,14 @@ $lang['first_contact_stp23'] = 'Locking a album means only administrators will b
$lang['first_contact_title24'] = '';
$lang['first_contact_stp24'] = 'Certainly, one of the most important page is the permission page of a private album. Click on the permission tab or click next';
$lang['first_contact_title25'] = 'Album Permission';
-$lang['first_contact_stp25'] = 'As you can read in the Help of your Piwigo -link at the top right-, album permissions are set by groups and users. You can directly set private/public multiple albums using the Administration » Albums » Properties page.';
+$lang['first_contact_stp25'] = 'As you can read in the Help of your Piwigo -link at the top right-, album permissions are set by groups and users. You can directly set private/public multiple albums using the <em>Administration » Albums » Properties</em> page.';
$lang['first_contact_title26'] = '';
$lang['first_contact_stp26'] = 'Here you can set the current album as private, then grant access to users and groups. By default, permissions are not recursive for sub albums, but upper-albums will be granted with the same permission in order to let the granted users browse to the album.';
$lang['first_contact_title27'] = '';
$lang['first_contact_stp27'] = 'Important fact: the webmasters and administrators are not omniscient when browsing the public part, but they can access to every album and photos on the admin part.';
$lang['first_contact_title28'] = 'Configuration';
$lang['first_contact_stp28'] = 'Now we will look at the options available to set Piwigo working your way. Click on Configuration->Options or just hit Next.';
-$lang['first_contact_title29'] = 'Configuration->Options->General';
+$lang['first_contact_title29'] = '<em>Configuration » Options » General</em>';
$lang['first_contact_stp29'] = 'Here, on that first page, you will set the essential and basic configuration of your gallery.';
$lang['first_contact_title30'] = '';
$lang['first_contact_stp30'] = 'Let\'s start by changing the tittle';
@@ -75,7 +75,7 @@ $lang['first_contact_stp31'] = 'Then the banner, which will be displayed on top
$lang['first_contact_title32'] = '';
$lang['first_contact_stp32'] = 'Now save you changes';
$lang['first_contact_title33'] = 'Guest settings';
-$lang['first_contact_stp33'] = 'Just a final word about the options, the \'Guest settings\' page is to set the preferences of unregistered visitors. Each time Piwigo refers to \'guest\' that means unregistered visitors.<br>Let\'s continue about Configuration: click on Configuration->Themes or just hit Next.';
+$lang['first_contact_stp33'] = 'Just a final word about the options, the \'Guest settings\' page is to set the preferences of unregistered visitors. Each time Piwigo refers to \'guest\' that means unregistered visitors.<br>Let\'s continue about Configuration: click on <em>Configuration » Themes</em> or just hit Next.';
$lang['first_contact_title34'] = 'Themes';
$lang['first_contact_stp34'] = 'Themes are one of the three way to customize your Piwigo, with Plugins and Templates. Themes installed are listed here.<br>More than one theme can be enabled: users can change their theme by choosing one among the one enabled here, if the option \'Allow user customization\' is checked on the Option page.';
$lang['first_contact_title35'] = 'Themes';
@@ -83,7 +83,7 @@ $lang['first_contact_stp35'] = 'Themes can also be set as Default, which means t
$lang['first_contact_title36'] = 'Themes';
$lang['first_contact_stp36'] = 'Themes have a system of dependency: that\'s why some theme can\'t be deleted (a parent theme can\'t be deleted if a child theme is enabled) or others can\'t be enabled (a child theme need its parent theme). For instance, when you put you\'re mouse over a Delete link, if the theme can\'t be deleted, a information bubble will explain you why.';
$lang['first_contact_title37'] = 'Themes';
-$lang['first_contact_stp37'] = 'To install new themes, you can directly download them from the tab \'Add a theme\'. Only the themes marked as compatible with your version of Piwigo are showed.<br>Let\'s discover the plugins now! Click on Plugin->Manage';
+$lang['first_contact_stp37'] = 'To install new themes, you can directly download them from the tab \'Add a theme\'. Only the themes marked as compatible with your version of Piwigo are showed.<br>Let\'s discover the plugins now! Click on <em>Plugin » Manage</em>';
$lang['first_contact_title38'] = 'Plugins';
$lang['first_contact_stp38'] = 'Plugins are very easy ways to customize your Piwigo. They can do almost anything you can imagine from small text addition to complete features, like the Community plugin which allows non administrators users to upload without entering to the administration part.';
$lang['first_contact_title39'] = 'Plugins';
diff --git a/plugins/TakeATour/tours/first_contact/tour.tpl b/plugins/TakeATour/tours/first_contact/tour.tpl
index 6b9d2afb3..48acd5927 100644
--- a/plugins/TakeATour/tours/first_contact/tour.tpl
+++ b/plugins/TakeATour/tours/first_contact/tour.tpl
@@ -17,7 +17,7 @@ tour.addSteps([
{
path: "{/literal}{$TAT_path}{literal}admin.php",
placement: "right",
- element: ".icon-plus-circled",
+ element: "a[href='./admin.php?page=photos_add']",
reflex:true,
title: "{/literal}{'first_contact_title2'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp2'|@translate|@escape:'javascript'}{literal}",
@@ -31,7 +31,7 @@ tour.addSteps([
},
{
path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
- placement: "left",
+ placement: "right",
element: "#albumSelection",
title: "{/literal}{'first_contact_title4'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp4'|@translate|@escape:'javascript'}{literal}"
@@ -39,31 +39,28 @@ tour.addSteps([
{//5
path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
placement: "top",
- element: "#uploadify",
+ element: ".plupload_add",
title: "{/literal}{'first_contact_title5'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp5'|@translate|@escape:'javascript'}{literal}"
},
{
- path: /admin\.php\?page=photos_add/,
- redirect:function (tour) {window.location = "admin.php?page=photos_add";},
- placement: "left",
- element: "#fileQueue",
+ path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
+ placement: "top",
+ element: ".plupload_start",
title: "{/literal}{'first_contact_title6'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp6'|@translate|@escape:'javascript'}{literal}"
},
{
- path: /admin\.php\?page=photos_add/,
- redirect:function (tour) {window.location = "admin.php?page=photos_add";},
+ path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
placement: "top",
- element: "#photosAddContent legend",
+ element: "#afterUploadActions",
title: "{/literal}{'first_contact_title7'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp7'|@translate|@escape:'javascript'}{literal}",
prev:4
},
{
- path: /admin\.php\?page=photos_add/,
- redirect:function (tour) {window.location = "admin.php?page=photos_add";},
- placement: "bottom",
+ path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
+ placement: "top",
element: "#batchLink",
reflex:true,
title: "{/literal}{'first_contact_title8'|@translate|@escape:'javascript'}{literal}",
@@ -341,7 +338,7 @@ tour.init();
// Start the tour
tour.start();
-jQuery( "input[class='submit']" ).click(function() {
+jQuery( ".plupload_start" ).click(function() {
if (tour.getCurrentStep()==5)
{
tour.goTo(6);