Author: david
Date: Tue Aug 30 15:41:15 2011
New Revision: 9633
Log:
Move styles to css classes. Rebind dialog to 'edit' link after update. Flash
notice on successful update.
Modified:
trunk/apps/qubit/modules/repository/templates/_uploadLimit.php
trunk/plugins/sfClassicPlugin/css/main.css
Modified: trunk/apps/qubit/modules/repository/templates/_uploadLimit.php
==============================================================================
--- trunk/apps/qubit/modules/repository/templates/_uploadLimit.php Tue Aug
30 14:03:08 2011 (r9632)
+++ trunk/apps/qubit/modules/repository/templates/_uploadLimit.php Tue Aug
30 15:41:15 2011 (r9633)
@@ -3,10 +3,10 @@
<h3><?php echo __('Disk quota used') ?></h3>
- <div style="margin: 5px 2px">
+ <div>
<?php if (0 < floatval($uploadLimit)): ?>
- <div class="progressBar" style="padding: 1px; background-color: #CCC;
height: 10px; width: 200px">
+ <div class="usageBar">
<div style="height: 10px; width: <?php echo $usageBarPixels ?>px;
background-color: <?php echo $usageBarColor ?>;"></div>
</div>
<?php echo __('%du% of %limit% <abbr title="1 GB = 1 000 000 000
bytes">GB</abbr> (%percent%%)', array('%du%' => $diskUsage, '%limit%' =>
$uploadLimit, '%percent%' => $diskUsagePercent)) ?>
@@ -75,6 +75,26 @@
// Replace previous HTML with response from editUploadLimit
$('#diskQuotaDisplay').replaceWith(response);
+
+ // Flash notice
+ var $notice = $('<div class="alert-message block-message
success">Limit updated</div>').hide();
+ $notice.insertBefore("#diskQuotaDisplay > div").show(500, function
()
+ {
+ setTimeout(function ()
+ {
+ $notice.hide(500, function()
+ {
+ $notice.remove();
+ })
+ }, 2000)
+ });
+
+ // Rebind edit link
+ var ulDialog = this;
+ $('#editUlLink').click(function ()
+ {
+ ulDialog.show();
+ });
};
var handleFailure = function(o) {
alert('The Fail!');
@@ -93,7 +113,8 @@
// Wire up the success and failure handlers
ulDialog.callback = {
success: handleSuccess,
- failure: handleFailure
+ failure: handleFailure,
+ scope: ulDialog
};
// Render the Dialog
Modified: trunk/plugins/sfClassicPlugin/css/main.css
==============================================================================
--- trunk/plugins/sfClassicPlugin/css/main.css Tue Aug 30 14:03:08 2011
(r9632)
+++ trunk/plugins/sfClassicPlugin/css/main.css Tue Aug 30 15:41:15 2011
(r9633)
@@ -968,3 +968,40 @@
margin: 0; /* Only needed in WebKit */
font:1em/100% Verdana,sans-serif;
}
+
+#diskQuotaDisplay > div
+{
+ margin: 5px 2px
+}
+
+#diskQuotaDisplay .usageBar
+{
+ background-color: #CCCCCC;
+ height: 10px;
+ padding: 1px;
+ width: 200px;
+}
+
+/* From https://github.com/twitter/bootstrap */
+.alert-message.block-message {
+ background-image: none;
+ background-color: #fdf5d9;
+ padding: 14px;
+ border-color: #fceec1;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+/* From https://github.com/twitter/bootstrap */
+.alert-message.block-message.success {
+ background-color: #d1eed1;
+ border-color: #bfe7bf;
+}
+
+.sidebar .alert-message.block-message {
+ padding: 5px;
+}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.