moving around the filepicker button
authorCharles Connell <charles@connells.org>
Wed, 12 Mar 2014 22:18:20 +0000 (18:18 -0400)
committerCharles Connell <charles@connells.org>
Thu, 13 Mar 2014 02:52:31 +0000 (22:52 -0400)
karmaworld/apps/notes/models.py
karmaworld/assets/css/note_course_pages.css
karmaworld/settings/common.py
karmaworld/templates/courses/course_detail.html
karmaworld/templates/partial/filepicker.html

index 3e58f4886aa3d23d2dc84d76afe33ecadea9d9de..c1fabac57ca2ed0854a702cf6f98530dafc6defe 100644 (file)
@@ -108,17 +108,14 @@ class Document(models.Model):
                     'data-fp-multiple': 'true', 
                     'data-fp-folders': 'true',
                     'data-fp-button-class':
-                      'add-note-btn small-10 columns large-4',
-                    'data-fp-button-text':
-                      mark_safe("<i class='fa fa-arrow-circle-o-up'></i> add notes"),
-                    'data-fp-drag-class':
-                      'dragdrop show-for-medium-up large-7 columns',
-                    'data-fp-drag-text': 'Drop Some Knowledge',
+                      'add-note-btn',
+                    'data-fp-button-text': 'Add Notes',
                     'data-fp-extensions':
                       '.pdf,.doc,.docx,.txt,.html,.rtf,.odt,.png,.jpg,.jpeg,.ppt,.pptx',
                     'data-fp-store-location': 'S3',
                     'data-fp-policy': fp_policy,
                     'data-fp-signature': fp_signature,
+                    'type': 'filepicker',
                     'onchange': "got_file(event)",
                 },
                 # FileField settings
index 115c6319004c6b473d3408bfb8f111c73ce993f9..635508a30604bde21a8f81723ad07bbd8792108a 100644 (file)
@@ -27,7 +27,7 @@ span.course-header-school
   cursor: pointer;
 }
 
-button.add-note {
+.add-note-btn {
   background: grey;
   color: white;
   border: none;
@@ -42,6 +42,10 @@ input.search-notes {
   margin-right: 0;
 }
 
+form.search-notes {
+  display: inline;
+}
+
 #note-sort-wrapper {
   float: right;
   display: inline;
@@ -57,4 +61,9 @@ select.note-sort {
   padding: 10px 0 0 0;
 }
 
+ul.socialaccount_providers li
+{
+  display: inline;
+}
+
 
index 440dd2af95ff50848ee67638e2f0d228c3926652..eff3233a659ca53f1d055ae2fb86d781ea5013c6 100644 (file)
@@ -14,6 +14,7 @@ from djcelery import setup_loader
 from karmaworld.secret.filepicker import FILEPICKER_API_KEY as fp_api
 
 FILEPICKER_API_KEY = fp_api
+FILEPICKER_INPUT_TYPE = 'filepicker'
 
 from karmaworld.secret.static_s3 import *
 
index 50e91dcfa4675e320cde9e70584880a0ef7ffe4e..8b73356bb83e6a20551597b7008ebd93e6c6ac23 100644 (file)
 
     <div id="note-search-bar" class="row">
       <div class="small-12 columns">
-        <button id="add-note-btn" class="add-note">Add a Note</button>
-        <input class="search-notes" type="text" placeholder="Search Notes" />
-        <input id="quiz-available-filter" type="checkbox" />
-        <label class="inline-label" for="quiz-available-filter">Quiz Available</label>
+        {{ file_upload_form.fp_file }}
+        <form class="search-notes" action="{% url 'note_search' %}" method="GET">
+          <input name="query" class="search-notes" type="text" placeholder="Search Notes" />
+          <input type="hidden" name="course_id" value="{{ course.id }}">
+        </form>
         <div id="note-sort-wrapper">
           Sort By
           <select class="note-sort">
           </select>
         </div>
       </div>
+      <div class="small-12 columns">
+        {% include 'partial/filepicker.html' %}
+      </div>
     </div>
 
-
-    <div class="row">
-      <div class="small-10 columns small-offset-1"> <hr/> </div>
-    </div>
-
-
-    {% include 'partial/filepicker.html' %}
-
     <div class="row">
       <div class="small-10 columns small-offset-1"> <hr/> </div>
     </div>
index b699ada9db072efe0e74e9583441a38c853f4924..68b5800b66e0becc4aa5769dac41df045579ad2a 100644 (file)
@@ -2,16 +2,11 @@
 {% load socialaccount %}
 {{ file_upload_form.media }}
 <section id=filepicker-form class="extend-form">
-  <div class="row" id="filepicker_row">
-    <div class="small-8 small-offset-1 columns large-10">
-       {{ file_upload_form.as_p }}
-    </div>
-  </div> <!--.row -->
   <div class="row" >
-    <div class="small-10 small-offset-1 columns">
+    <div class="small-12 columns">
       <div id="forms_container">
       </div>
-      <div id="success" class="hide">
+      <div id="success" class="">
         <p>Thank you for sharing:</p>
         <ul id="uploaded_files">
         </ul>
@@ -20,7 +15,7 @@
             We'd love to have you sign up so you can <strong>claim the <span id="thank-points"></span> karma points
             you just got.</strong> With a KarmaNotes account,
             you can build a reputation by continuing to upload great notes.
-            <a href="">Want to share again?</a></p>
+            Refresh to share more notes.</p>
           <div class="socialaccount_ballot">
             <ul class="socialaccount_providers">
               {% include "socialaccount/snippets/provider_list.html" with process="login" %}
       </div>
     </div>
 
-    <div id="form-template" class="row" style="display:none">
+    <div id="form-template" class="row">
       <form class="inline-form" method="POST" action="{% url 'upload_post' %}">
         <div class="small-11 large-6 columns">
-          <legend>Title of Note <small class="form">* Required</small></legend>
+          <label for="id_name">Title of Note <small class="form">* Required</small></label>
           <input type="text" class="intext" id="id_name" name="name"
                 placeholder="">
         </div>
         <div class="small-12 large-5 columns">
-          <legend>Tags (comma seperated)</legend>
+          <label for="id_tags">Tags (comma seperated)</label>
           <input type="text" id="id_tags" name="tags" class="taggit-tags"
                 placeholder="shakespeare, econ, physics">
         </div>