1. Olemis Lang
  2. trac-zurbtheme

Commits

jota81  committed 58fcfe0

Fixed problem if no file list exists then not create de dl with class
attachments file
Removed jQuery('$files_container').prependTo('#fileupload').addClass('files');
because always files class y created
Added class h3attachment for Attachments Title to prevent anchors on tag h3
Removed compact = True in include "zurb_list_of_attachments.html" at wiki_view
to show the list of files.
Removed include "zurb_attach_file_form.html" to remove the attach button because
the list of attach contain the add files button.

  • Participants
  • Parent commits 66d43fc
  • Branches default

Comments (0)

Files changed (4)

File zurbtheme/htdocs/zurb.css

View file
  • Ignore whitespace
     display: list-item;
     list-style: square outside none;
 }
+
+div #attachments {
+    margin-bottom: 10px;
+}
 /* @end */
 
 input[type="file"]{
     margin-top: 10px;
 }
 
-.fileinput-button input {
-    cursor: pointer !important;
-    direction: ltr;
-    font-size: 23px;
-    margin: 0;
-    opacity: 0;
-    position: absolute;
-    right: 0;
-    top: 0;
-}
-
-input[type="file"] {
-    display: block;
-}
-
-.btn-success {
-    background-color: #5CB85C;
-    border-color: #4CAE4C;
-    color: #FFFFFF;
-}
-
 .progress {
     background-color: #F5F5F5;
     border-radius: 4px 4px 4px 4px;
     background-color: #5CB85C;
 }
 
-.fileinput-button input {
-    cursor: pointer !important;
-    direction: ltr;
-    font-size: 23px;
-    margin: 0;
+.h3attachment{
+    font-size: 1.25em !important; line-height: 1.4;
+    font-family: "Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;
+    font-weight: bold;
+    margin-bottom: 10px;
+}
+
+.btn-forfileinput
+{
+    margin-top: 5px;
+    font-size: 1.15em;
+    font-family: "Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;
+    font-weight: bold;
+}
+
+.fade.in {
+    opacity: 1;
+}
+
+.fade {
     opacity: 0;
-    position: absolute !important;
-    right: 0 !important;
-    top: 0 !important;
 }

File zurbtheme/templates/zurb_attach_file_form.html

View file
  • Ignore whitespace
         <input type="hidden" name="action" value="new" />
         <input type="submit" class="button tiny" name="attachfilebutton" value="${value_of('add_button_title', None) or _('Attach file')}" />
     </form>
-    <py:if test="zurb_attach_advanced and alist.can_create and
+
+    <py:if test="advanced and zurb_attach_advanced and alist.can_create and
  	        context.resource and context.resource.realm and context.resource.id">
     <!--! The file upload form used as target for the file upload widget -->
         <script type="text/x-tmpl" id="tmpl-attach-advanced">
                 <div class="fileupload-loading"></div>
                 <!--! The table listing the files available for upload/download -->
                 <!--! table role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table -->
-                <dl py:if="not files_container" class="attachments files"></dl>
+
+                <!-- REMOVED because if no file list exists then not create de dl with class attachments file-->
+                <!-- <dl py:if="not files_container" class="attachments files"></dl>-->
+                <dl class="attachments files"></dl>
                 <!--! The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
                 <div class="fileupload-buttonbar overlay-target">
                     <div class="overlay dnd-overlay"></div>
                             <div class="btn-group">
                             <span class="btn btn-forfileinput fileinput-button">
                                 <i class="icon-plus"></i>
-                                <span>Add files...</span>
+                                <span>+ Add files...</span>
                                 <input class="btn tiny" type="file" name="attachment" multiple="" />
                             </span>
+
                             <button type="submit" class="tiny start">
                                 <i class="icon-upload"></i>
                                 <span>Start upload</span>
                 });
 
                 <py:if test="files_container">
-                    jQuery('$files_container').prependTo('#fileupload').addClass('files');
+                   /* jQuery('$files_container').prependTo('#fileupload').addClass('files');*/
                 </py:if>
 
                 jQuery('#fileupload').fileupload({

File zurbtheme/templates/zurb_list_of_attachments.html

View file
  • Ignore whitespace
  - add_button_title=None: the title of the "Attach" button
  - foldable=False: if True, make the list of attachments foldable
 -->
+
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:py="http://genshi.edgewall.org/"
       xmlns:xi="http://www.w3.org/2001/XInclude"
        </span>) - added by <em>${authorinfo(attachment.author)}</em> ${pretty_dateinfo(attachment.date)}.</span>
     </i18n:msg>
 </py:def>
+
 <py:if test="alist.attachments or alist.can_create">
     <div id="attachments" py:choose="">
         <py:when test="compact and alist.attachments">
             </div>
         </py:when>
         <py:when test="not compact">
-            <h3 id="comment:attachments" class="${'foldable' if foldable else None}">Attachments <span class="trac-count">(${len(alist.attachments)})</span></h3>
+            <span id="comment:attachments" class="h3attachment ${'foldable' if foldable else None}">Attachments <span class="trac-count">(${len(alist.attachments)})</span></span>
             <div py:if="alist.attachments or alist.can_create" class="attachments">
                 <dl py:if="alist.attachments" class="attachments">
                     <div py:for="attachment in alist.attachments"

File zurbtheme/templates/zurb_wiki_view.html

View file
  • Ignore whitespace
         </py:otherwise>
       </div>
         <xi:include href="zurb_list_of_attachments.html"
-                    py:with="alist = attachments; compact = True; foldable = True"/>
+                    py:with="alist = attachments; foldable = True;"/>
 
         <py:with vars="delete_perm = 'WIKI_DELETE' in perm(page.resource);
                      rename_perm = 'WIKI_RENAME' in perm(page.resource)">
                             </div>
                         </form>
                         <py:if test="page.exists">
-                            <xi:include href="zurb_attach_file_form.html" py:with="alist = attachments"/>
+                           <!-- Removed to show always the list of files with jq file upload -->
+                           <!-- <xi:include href="zurb_attach_file_form.html" py:with="alist = attachments"/> -->
                         </py:if>
                     </py:if>
                     <form method="get" action="${href.wiki(page.name)}" id="rename" py:if="page.exists and rename_perm">