Permalink
Browse files

NEW Show the allowed extensions as a toggle tip as per trac 7993

NEW Added a behat test for showing extension trac 7993
  • Loading branch information...
kmayo-ss authored and chillu committed Dec 19, 2012
1 parent f72a024 commit 561e629c164a8869808b754ca4d8ef0735a47763
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -16,4 +16,17 @@
this.find('.ss-uploadfield-editandorganize').show();
}
});
+ $('.ss-uploadfield-view-allowed-extensions').entwine({
+ onmatch: function() {
+ this.find('.description .toggle-content').hide();
+ this._super();
+ }
+ });
+
+ $('.ss-uploadfield-view-allowed-extensions .toggle').entwine({
+ onclick: function(e) {
+ jQuery(this).closest('.description').find('.toggle-content').toggle();
+ return false;
+ }
+ });
}(jQuery));
View
@@ -1,6 +1,7 @@
en:
AssetAdmin:
ALLOWEDEXTS: 'Allowed extensions'
+ SHOWALLOWEDEXTS: 'Show allowed extensions'
NEWFOLDER: NewFolder
AssetTableField:
CREATED: 'First uploaded'
@@ -12,6 +12,11 @@
clear:both;
max-width:750px;
display:block;
+
+ .toggle {
+ font-style: normal;
+ font-size: $font-base-size;
+ }
}
#AssetUploadField {
@@ -273,9 +278,9 @@ body.cms.ss-uploadfield-edit-iframe, .composite.ss-assetuploadfield .details fie
}
}
.ss-uploadfield-fromcomputer {
- /*position: relative;
+ /*position: relative; */
overflow: hidden;
- display: block;*/
+ display: block;
}
.ss-uploadfield-item-uploador {
float: left;
@@ -28,9 +28,11 @@
</div>
<span class="ss-uploadfield-view-allowed-extensions">
+ <span class="description">
- <em><% _t('AssetAdmin.ALLOWEDEXTS', 'Allowed extensions') %></em>
- $Extensions
+ <a href="#" class="toggle"><% _t('AssetAdmin.SHOWALLOWEDEXTS', 'Show allowed extensions') %></a>
+ <p class="toggle-content">$Extensions</p>
+ </span>
</span>
<div class="clear"><!-- --></div>
@@ -81,4 +81,9 @@ Feature: Manage files
# /show/0 is to ensure that we are on top level folder
And I go to "/admin/assets/show/0"
And I click on "folder2" in the "Files" table
- And the "folder2" table should contain "file1"
+ And the "folder2" table should contain "file1"
+
+ Scenario: I can see allowed extensions help
+ When I go to "/admin/assets/add"
+ And I follow "Show allowed extensions"
+ Then I should see "png,"

0 comments on commit 561e629

Please sign in to comment.