[Pkg-owncloud-commits] [owncloud] 03/78: Read version and product name from update template
David Prévot
taffit at moszumanska.debian.org
Sun May 31 01:59:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit ec71e0b4e6ab19ca50ebcc9714042a1be45d12a5
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Wed Jan 14 11:31:42 2015 +0100
Read version and product name from update template
During upgrade, the config settings aren't always available due to
base.php changes. This fix makes the update info page read the product
name and version from the update template, which already had them.
---
core/js/update.js | 12 ++++++++----
core/templates/update.admin.php | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/core/js/update.js b/core/js/update.js
index e5ce322..29397b2 100644
--- a/core/js/update.js
+++ b/core/js/update.js
@@ -17,7 +17,7 @@
*
* @param $el progress list element
*/
- start: function($el) {
+ start: function($el, options) {
if (this._started) {
return;
}
@@ -28,8 +28,8 @@
this.addMessage(t(
'core',
'Updating {productName} to version {version}, this may take a while.', {
- productName: OC.theme.name || 'ownCloud',
- version: OC.config.versionstring
+ productName: options.productName || 'ownCloud',
+ version: options.version
}),
'bold'
).append('<br />'); // FIXME: these should be ul/li with CSS paddings!
@@ -77,10 +77,14 @@
$(document).ready(function() {
$('.updateButton').on('click', function() {
+ var $updateEl = $('.update');
var $progressEl = $('.updateProgress');
$progressEl.removeClass('hidden');
$('.updateOverview').addClass('hidden');
- OC.Update.start($progressEl);
+ OC.Update.start($progressEl, {
+ productName: $updateEl.attr('data-productname'),
+ version: $updateEl.attr('data-version'),
+ });
return false;
});
});
diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php
index 29df0dd..ccd5d23 100644
--- a/core/templates/update.admin.php
+++ b/core/templates/update.admin.php
@@ -1,4 +1,4 @@
-<div class="update">
+<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
<div class="updateOverview">
<h2 class="title bold"><?php p($l->t('%s will be updated to version %s.',
array($_['productName'], $_['version']))); ?></h2>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list