Commits

Ales Zabala Alava committed fd7887f

upgrading to django 1.3: rename media to static

  • Participants
  • Parent commits e7384de

Comments (0)

Files changed (22)

File adminfiles/media/adminfiles/adminfiles.css

-#content { margin:10px 0; }
-#container { min-width:0; }
-#user-tools { display:none; }
-#footer { display:none; }
-
-#adminfiles { 
-    list-style-type:none; 
-    padding:0; 
-    position:absolute; 
-    top:0px; 
-    left:110px; 
-}
-
-#adminfiles .nav {
-    list-style-type:none;
-    width:100%;
-    height: 2em;
-}
-
-#adminfiles .nav .next {
-    float:right;
-}
-
-#adminfiles .nav .prev {
-    float:left;
-}
-
-.item { 
-    float:left; 
-    overflow:hidden; 
-    border:1px solid #ccc; 
-    background:#fafafa url(mimetypes/empty.png) no-repeat 41px 70px; 
-    text-align:center; 
-    cursor:pointer; 
-    width:144px; 
-    height:150px; 
-    margin:0 11px 12px 0;
-}
-
-.upload-title { 
-    background:#fff; 
-    opacity:0.8;
-}
-
-.popup { 
-    position:absolute; 
-    z-index:100; 
-    opacity:0.9; 
-    background:#eee; 
-    width:126px; 
-    height:120px; 
-    padding:5px; 
-    display:none; 
-    text-align:left; 
-    margin:15px 0 0 3px; 
-    border:1px solid #aaa; 
-    border-top-color:#ddd; 
-    border-left-color:#ddd; 
-}
-
-.popup ul { padding:0; }
-.popup li { list-style-type:none; }
-.popup .close { float:right; color:#CC3434; }
-.popup input { width:116px; }
-.popup .deletelink { position: absolute; left: 5px; bottom: 10px; }
-.popup .changelink { position: absolute; right: 5px; bottom: 10px; }
-        
-#adminfiles-filter { 
-    position:fixed; 
-    left:0; 
-    width:100%; 
-    margin-left: -30px;
-}
-
-#adminfiles-filter li {
-    list-style-type:none;
-}
-
-#adminfiles-filter li.upload {
-    margin-top: 10px;
-}
-        
-/* mimetypes, icons from Nuvola */
-.image, .video { 
-    background-image:none; 
-    background-position:center center; 
-}
-
-.pdf { background-image:url(mimetypes/pdf.png); }
-.msword { background-image:url(mimetypes/doc.png); }
-.vndms-excel { background-image:url(mimetypes/xls.png); }
-.zip, .x-tar { background-image:url(mimetypes/zip.png); }
-    

File adminfiles/media/adminfiles/adminfiles.js

-function insertAtCursor(myField, myValue) {
-    //IE support
-    if (document.selection) {
-        myField.focus();
-        sel = document.selection.createRange();
-        sel.text = myValue;
-    }
-    //MOZILLA/NETSCAPE support
-    else if (myField.selectionStart || myField.selectionStart == '0') {
-        var startPos = myField.selectionStart;
-        var endPos = myField.selectionEnd;
-        myField.value = myField.value.substring(0, startPos)
-        + myValue
-        + myField.value.substring(endPos, myField.value.length);
-    } else {
-        myField.value += myValue;
-    }
-}
-
-function showEditPopup(triggeringLink) {
-    var name = 'edit_popup';
-    var href = triggeringLink.href;
-    if (href.indexOf('?') == -1) {
-        href += '?_popup=1';
-    } else {
-        href  += '&_popup=1';
-    }
-    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
-    win.focus();
-    return false;
-}
-
-function dismissEditPopup(win) {
-    location.reload(true);
-    win.close();
-}
-
-function showAddUploadPopup(triggeringLink) {
-    var name = 'add_upload_popup';
-    var href = triggeringLink.href;
-    if (href.indexOf('?') == -1) {
-        href += '?_popup=1';
-    } else {
-        href  += '&_popup=1';
-    }
-    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
-    win.focus();
-    return false;
-}
-
-function dismissAddUploadPopup(win) {
-    location.reload(true);
-    win.close();
-}
-
-$(function(){
-      $('#adminfiles li').click(
-          function(){
-	      $(this).children('.popup').show();
-	  });
-      $('.popup .close').click(
-          function(){
-	      $(this).parent('.popup').hide();
-	      return false;
-	  });
-      $('.popup .select').click(
-          function(){
-	      for (i=0; i<FIELD.options.length; i++) {
-		  if (FIELD.options[i].value == this.rel) {
-                      FIELD.options[i].selected = true;
-                  }
-	      }
-	      $(this).parents('.popup').hide();
-	      return false;
-	  });
-      $('.popup .insert').click(
-          function(){
-              var insertText = this.rel;
-              if(!insertText.match('://')) {
-                  insertText = START + insertText + END;
-                  }
-              insertAtCursor(FIELD, insertText);
-	      $(this).parents('.popup').hide();
-	      return false;
-	});
-    $('#refresh').click(function(){
-	    location.reload(true);
-	    return false;
-	});
-});

File adminfiles/media/adminfiles/icon_addlink.gif

Removed
Old image

File adminfiles/media/adminfiles/icon_refreshlink.gif

Removed
Old image

File adminfiles/media/adminfiles/mimetypes/doc.png

Removed
Old image

File adminfiles/media/adminfiles/mimetypes/empty.png

Removed
Old image

File adminfiles/media/adminfiles/mimetypes/pdf.png

Removed
Old image

File adminfiles/media/adminfiles/mimetypes/xls.png

Removed
Old image

File adminfiles/media/adminfiles/mimetypes/zip.png

Removed
Old image

File adminfiles/media/adminfiles/model.js

-(function($) {
-     $(function(){
-           $('.adminfilespicker').each(
-               function(){
-	           var href = '/adminfiles/all/?field='+this.id;
-	           if (this.options) {
-		       $(this).siblings('a.add-another').remove();
-		       href += '&field_type=select';
-	           }
-	           $(this).after('<iframe frameborder="0" style="border:none; width:755px; height:210px;" src="' + href + '"></iframe>');
-	       });
-       });
- })(jQuery);

File adminfiles/media/adminfiles/photo-edit.js

-$(function(){
-    $('#id_upload').after(' <a href="#" id="photo-edit">Edit this photo</a>');
-    $('#photo-edit').hide();
-    var ext = '';
-    //check if the upload field contains an image path or PDF
-    $('#id_upload').change(function(){
-        var image_ext = ['.jpg', '.jpeg', '.gif', '.png', '.pdf'];
-        var found = false;
-        for (var i=0; i<image_ext.length; i++) {
-            if ($(this).val().lastIndexOf(image_ext[i]) > 0) {
-                found = true;
-                ext = image_ext[i].replace('.','');
-                break;
-            }
-        }
-        if (found == true)
-            $('#photo-edit').show();
-        else
-            $('#photo-edit').hide();
-    });
-    //edit form to post to snipshot and submit
-    $('a#photo-edit').click(function(){
-        $(this).after('<input type="hidden" name="snipshot_input" value="upload"/>');
-        $(this).after('<input type="hidden" name="snipshot_callback" value="'+document.location.href+'"/>');
-        $(this).parents('form').attr('action', 'http://services.snipshot.com/');
-        $(this).parents('form').submit();
-        return false;
-    });
-});

File adminfiles/static/adminfiles/adminfiles.css

+#content { margin:10px 0; }
+#container { min-width:0; }
+#user-tools { display:none; }
+#footer { display:none; }
+
+#adminfiles { 
+    list-style-type:none; 
+    padding:0; 
+    position:absolute; 
+    top:0px; 
+    left:110px; 
+}
+
+#adminfiles .nav {
+    list-style-type:none;
+    width:100%;
+    height: 2em;
+}
+
+#adminfiles .nav .next {
+    float:right;
+}
+
+#adminfiles .nav .prev {
+    float:left;
+}
+
+.item { 
+    float:left; 
+    overflow:hidden; 
+    border:1px solid #ccc; 
+    background:#fafafa url(mimetypes/empty.png) no-repeat 41px 70px; 
+    text-align:center; 
+    cursor:pointer; 
+    width:144px; 
+    height:150px; 
+    margin:0 11px 12px 0;
+}
+
+.upload-title { 
+    background:#fff; 
+    opacity:0.8;
+}
+
+.popup { 
+    position:absolute; 
+    z-index:100; 
+    opacity:0.9; 
+    background:#eee; 
+    width:126px; 
+    height:120px; 
+    padding:5px; 
+    display:none; 
+    text-align:left; 
+    margin:15px 0 0 3px; 
+    border:1px solid #aaa; 
+    border-top-color:#ddd; 
+    border-left-color:#ddd; 
+}
+
+.popup ul { padding:0; }
+.popup li { list-style-type:none; }
+.popup .close { float:right; color:#CC3434; }
+.popup input { width:116px; }
+.popup .deletelink { position: absolute; left: 5px; bottom: 10px; }
+.popup .changelink { position: absolute; right: 5px; bottom: 10px; }
+        
+#adminfiles-filter { 
+    position:fixed; 
+    left:0; 
+    width:100%; 
+    margin-left: -30px;
+}
+
+#adminfiles-filter li {
+    list-style-type:none;
+}
+
+#adminfiles-filter li.upload {
+    margin-top: 10px;
+}
+        
+/* mimetypes, icons from Nuvola */
+.image, .video { 
+    background-image:none; 
+    background-position:center center; 
+}
+
+.pdf { background-image:url(mimetypes/pdf.png); }
+.msword { background-image:url(mimetypes/doc.png); }
+.vndms-excel { background-image:url(mimetypes/xls.png); }
+.zip, .x-tar { background-image:url(mimetypes/zip.png); }
+    

File adminfiles/static/adminfiles/adminfiles.js

+function insertAtCursor(myField, myValue) {
+    //IE support
+    if (document.selection) {
+        myField.focus();
+        sel = document.selection.createRange();
+        sel.text = myValue;
+    }
+    //MOZILLA/NETSCAPE support
+    else if (myField.selectionStart || myField.selectionStart == '0') {
+        var startPos = myField.selectionStart;
+        var endPos = myField.selectionEnd;
+        myField.value = myField.value.substring(0, startPos)
+        + myValue
+        + myField.value.substring(endPos, myField.value.length);
+    } else {
+        myField.value += myValue;
+    }
+}
+
+function showEditPopup(triggeringLink) {
+    var name = 'edit_popup';
+    var href = triggeringLink.href;
+    if (href.indexOf('?') == -1) {
+        href += '?_popup=1';
+    } else {
+        href  += '&_popup=1';
+    }
+    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
+    win.focus();
+    return false;
+}
+
+function dismissEditPopup(win) {
+    location.reload(true);
+    win.close();
+}
+
+function showAddUploadPopup(triggeringLink) {
+    var name = 'add_upload_popup';
+    var href = triggeringLink.href;
+    if (href.indexOf('?') == -1) {
+        href += '?_popup=1';
+    } else {
+        href  += '&_popup=1';
+    }
+    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
+    win.focus();
+    return false;
+}
+
+function dismissAddUploadPopup(win) {
+    location.reload(true);
+    win.close();
+}
+
+$(function(){
+      $('#adminfiles li').click(
+          function(){
+	      $(this).children('.popup').show();
+	  });
+      $('.popup .close').click(
+          function(){
+	      $(this).parent('.popup').hide();
+	      return false;
+	  });
+      $('.popup .select').click(
+          function(){
+	      for (i=0; i<FIELD.options.length; i++) {
+		  if (FIELD.options[i].value == this.rel) {
+                      FIELD.options[i].selected = true;
+                  }
+	      }
+	      $(this).parents('.popup').hide();
+	      return false;
+	  });
+      $('.popup .insert').click(
+          function(){
+              var insertText = this.rel;
+              if(!insertText.match('://')) {
+                  insertText = START + insertText + END;
+                  }
+              insertAtCursor(FIELD, insertText);
+	      $(this).parents('.popup').hide();
+	      return false;
+	});
+    $('#refresh').click(function(){
+	    location.reload(true);
+	    return false;
+	});
+});

File adminfiles/static/adminfiles/icon_addlink.gif

Added
New image

File adminfiles/static/adminfiles/icon_refreshlink.gif

Added
New image

File adminfiles/static/adminfiles/mimetypes/doc.png

Added
New image

File adminfiles/static/adminfiles/mimetypes/empty.png

Added
New image

File adminfiles/static/adminfiles/mimetypes/pdf.png

Added
New image

File adminfiles/static/adminfiles/mimetypes/xls.png

Added
New image

File adminfiles/static/adminfiles/mimetypes/zip.png

Added
New image

File adminfiles/static/adminfiles/model.js

+(function($) {
+     $(function(){
+           $('.adminfilespicker').each(
+               function(){
+	           var href = '/adminfiles/all/?field='+this.id;
+	           if (this.options) {
+		       $(this).siblings('a.add-another').remove();
+		       href += '&field_type=select';
+	           }
+	           $(this).after('<iframe frameborder="0" style="border:none; width:755px; height:210px;" src="' + href + '"></iframe>');
+	       });
+       });
+ })(jQuery);

File adminfiles/static/adminfiles/photo-edit.js

+$(function(){
+    $('#id_upload').after(' <a href="#" id="photo-edit">Edit this photo</a>');
+    $('#photo-edit').hide();
+    var ext = '';
+    //check if the upload field contains an image path or PDF
+    $('#id_upload').change(function(){
+        var image_ext = ['.jpg', '.jpeg', '.gif', '.png', '.pdf'];
+        var found = false;
+        for (var i=0; i<image_ext.length; i++) {
+            if ($(this).val().lastIndexOf(image_ext[i]) > 0) {
+                found = true;
+                ext = image_ext[i].replace('.','');
+                break;
+            }
+        }
+        if (found == true)
+            $('#photo-edit').show();
+        else
+            $('#photo-edit').hide();
+    });
+    //edit form to post to snipshot and submit
+    $('a#photo-edit').click(function(){
+        $(this).after('<input type="hidden" name="snipshot_input" value="upload"/>');
+        $(this).after('<input type="hidden" name="snipshot_callback" value="'+document.location.href+'"/>');
+        $(this).parents('form').attr('action', 'http://services.snipshot.com/');
+        $(this).parents('form').submit();
+        return false;
+    });
+});