]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed DOM elements, styling and code style issues
authorVincent Petry <pvince81@owncloud.com>
Wed, 28 May 2014 09:29:22 +0000 (11:29 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 28 May 2014 09:29:22 +0000 (11:29 +0200)
- Reduced number of DOM elements
- Also added mention of "config" backup.

core/css/styles.css
core/js/update.js
core/templates/update.admin.php

index fdfe282198d4d518b273d4d9337d96cb4a9739a1..c493941fed871e0608588c562937fbf3761472ad 100644 (file)
@@ -370,7 +370,7 @@ input[type="submit"].enabled {
        opacity: .6;
 }
 
-#body-login .update .title {
+#body-login .update h2 {
        font-weight: bold;
        font-size: 18px;
        margin-bottom: 30px;
index abf2d6ae6db80e21efdde05b8030ae0d34f1d570..cc0f541bd7985c9e9afd8bedb4f28e0106883a2a 100644 (file)
@@ -18,7 +18,6 @@
                 * @param $el progress list element
                 */
                start: function($el) {
-                       var self = this;
                        if (this._started) {
                                return;
                        }
                                .addClass('error bold')
                                .append('<br />')
                                .append(t('core', 'The update was unsuccessful.' +
-                                  'Please report this issue to the <a href="https://github.com/owncloud/core/issues" target="_blank">ownCloud community</a>.'))
+                                       'Please report this issue to the ' +
+                                       '<a href="https://github.com/owncloud/core/issues" target="_blank">ownCloud community</a>.'))
                                .appendTo($el);
                        });
-                       updateEventSource.listen('done', function(message) {
+                       updateEventSource.listen('done', function() {
                                // FIXME: use product name
-                               $('<span>').addClass('bold').append('<br />').append(t('core', 'The update was successful. Redirecting you to ownCloud now.')).appendTo($el);
+                               $('<span>').addClass('bold')
+                                       .append('<br />')
+                                       .append(t('core', 'The update was successful. Redirecting you to ownCloud now.'))
+                                       .appendTo($el);
                                setTimeout(function () {
                                        OC.redirect(OC.webroot);
                                }, 3000);
 })();
 
 $(document).ready(function() {
-       $('.updateForm').on('submit', function(ev) {
-               ev.preventDefault();
+       $('.updateButton').on('click', function() {
                var $progressEl = $('.updateProgress');
                $progressEl.removeClass('hidden');
-               $('.updateForm').addClass('hidden');
+               $('.updateOverview').addClass('hidden');
                OC.Update.start($progressEl);
                return false;
        });
index acc9c26c662821f3272793888e2c58d3ef4b4886..a09e2d07bf473475b75b59e7ca2bb754de195fc2 100644 (file)
@@ -1,32 +1,27 @@
 <div class="update">
-       <form name="updateForm" class="updateForm">
-               <p class="title bold">
-               <?php p($l->t('%s will be updated to version %s.',
-                       array($_['productName'], $_['version']))); ?>
-               </p>
+       <div class="updateOverview">
+               <h2 class="title bold"><?php p($l->t('%s will be updated to version %s.',
+                       array($_['productName'], $_['version']))); ?></h2>
                <?php if (!empty($_['appList'])) { ?>
                <div class="infogroup">
-                       <p class="bold"><?php p($l->t('The following apps will be disabled during the upgrade:')) ?></p>
+                       <span class="bold"><?php p($l->t('The following apps will be disabled:')) ?></span>
                        <ul class="content appList">
-                       <?php foreach ($_['appList'] as $appInfo) { ?>
-                       <li><?php p($appInfo['name']) ?> (<?php p($appInfo['id']) ?>)</li>
-                       <?php } ?>
+                               <?php foreach ($_['appList'] as $appInfo) { ?>
+                               <li><?php p($appInfo['name']) ?> (<?php p($appInfo['id']) ?>)</li>
+                               <?php } ?>
                        </ul>
                </div>
                <?php } ?>
                <?php if (!empty($_['oldTheme'])) { ?>
-               <div class="infogroup">
-                       <p class="bold"><?php p($l->t('The theme %s has been disabled.', array($_['oldTheme']))) ?></p>
+               <div class="infogroup bold">
+                       <?php p($l->t('The theme %s has been disabled.', array($_['oldTheme']))) ?>
                </div>
                <?php } ?>
-               <div class="infogroup">
-                       <p class="bold"><?php p($l->t('Please make sure that the database and the data folder have been backed up before proceeding.')) ?></p>
-               </div>
-               <div>
-                       <input type="submit" value="<?php p($l->t('Start upgrade')) ?>"></input>
+               <div class="infogroup bold">
+                       <?php p($l->t('Please make sure that the database, the config folder and the data folder have been backed up before proceeding.')) ?>
                </div>
-       </form>
-
-       <div class="updateProgress hidden">
+               <input class="updateButton" type="button" value="<?php p($l->t('Start update')) ?>">
        </div>
+
+       <div class="updateProgress hidden"></div>
 </div>