GUAC-928 Restore file upload functionality, improve error appearance, and add translated units and file upload sizes.

This commit is contained in:
James Muehlner
2014-12-04 23:52:02 -08:00
parent 466aa8ba2d
commit 8ddf6e99b7
10 changed files with 344 additions and 23 deletions

View File

@@ -78,6 +78,28 @@ angular.module('notification').directive('guacNotification', [function guacNotif
*/
defaultCallback : '=',
/**
* The text to use for displaying the progress. For the sake of
* i18n, the variable PROGRESS will be applied within the
* translation string for formatting plurals, etc., while the
* variable UNIT will be applied, if needed, for whatever units
* are applicable to the progress display.
*
* @type String
* @example
* "{PROGRESS} {UNIT, select, b{B} kb{KB}} uploaded."
*/
progressText : '=',
/**
* The unit which applies to the progress indicator, if any. This
* will be substituted in the progressText string with the UNIT
* variable.
*
* @type String
*/
progressUnit : '=',
/**
* Arbitrary value denoting how much progress has been made
* in some ongoing task that this notification represents.

View File

@@ -27,6 +27,10 @@
color: black;
}
.notification.error {
background: #FDD;
}
.notification .body {
margin: 0.5em;
}

View File

@@ -32,10 +32,10 @@
<p ng-show="text" class="text">{{text | translate}}</p>
<!-- Current progress -->
<div ng-show="progress" class="progress">{{progress}}</div>
<div ng-show="progressText" class="progress">{{progressText | translate:"{ PROGRESS: progress, UNIT: progressUnit }"}}</div>
<!-- Default action countdown text -->
<p ng-show="countdownText" class="countdown-text">{{countdownText | translate:"{ REMAINING: timeRemaining}"}}</p>
<p ng-show="countdownText" class="countdown-text">{{countdownText | translate:"{ REMAINING: timeRemaining }"}}</p>
</div>