Permalink
Browse files

Improved NoScript usability.

  • Loading branch information...
1 parent a44bd91 commit 825879e070d60e02067caf5315a0e08ff6acb96b @blueimp committed Oct 23, 2012
Showing with 46 additions and 10 deletions.
  1. +27 −0 css/jquery.fileupload-ui-noscript.css
  2. +7 −3 index.html
  3. +12 −7 js/main.js
@@ -0,0 +1,27 @@
+@charset "UTF-8";
+/*
+ * jQuery File Upload UI Plugin NoScript CSS 1.0
+ * https://github.com/blueimp/jQuery-File-Upload
+ *
+ * Copyright 2012, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ */
+
+.fileinput-button input {
+ position: static;
+ opacity: 1;
+ filter: none;
+ transform: none;
+ font-size: inherit;
+ direction: inherit;
+}
+
+.fileinput-button span,
+.fileinput-button i,
+.fileupload-buttonbar .delete,
+.fileupload-buttonbar .toggle {
+ display: none;
+}
View
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<!--
/*
- * jQuery File Upload Plugin Demo 6.9.6
+ * jQuery File Upload Plugin Demo 6.10
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -31,6 +31,8 @@
<link rel="stylesheet" href="http://blueimp.github.com/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
<link rel="stylesheet" href="css/jquery.fileupload-ui.css">
+<!-- CSS adjustments for browsers with JavaScript disabled -->
+<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript>
<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
@@ -46,7 +48,7 @@
<a class="brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
<div class="nav-collapse">
<ul class="nav">
- <li class="active"><a href="#">Demo</a></li>
+ <li class="active"><a href="http://blueimp.github.com/jQuery-File-Upload/">Demo</a></li>
<li><a href="https://github.com/blueimp/jQuery-File-Upload/downloads">Downloads</a></li>
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
@@ -68,7 +70,9 @@
</blockquote>
<br>
<!-- The file upload form used as target for the file upload widget -->
- <form id="fileupload" action="server/php/" method="POST" enctype="multipart/form-data">
+ <form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">
+ <!-- Redirect browsers with JavaScript disabled to the origin page -->
+ <noscript><input type="hidden" name="redirect" value="http://blueimp.github.com/jQuery-File-Upload/"></noscript>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="span7">
View
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin JS Example 6.7
+ * jQuery File Upload Plugin JS Example 6.10
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -16,7 +16,9 @@ $(function () {
'use strict';
// Initialize the jQuery File Upload widget:
- $('#fileupload').fileupload();
+ $('#fileupload').fileupload({
+ url: 'server/php/'
+ });
// Enable iframe cross-domain access via redirect option:
$('#fileupload').fileupload(
@@ -66,12 +68,15 @@ $(function () {
// Load existing files:
$('#fileupload').each(function () {
var that = this;
- $.getJSON(this.action, function (result) {
- if (result && result.length) {
- $(that).fileupload('option', 'done')
- .call(that, null, {result: result});
+ $.getJSON(
+ $(this).fileupload('option', 'url'),
+ function (result) {
+ if (result && result.length) {
+ $(that).fileupload('option', 'done')
+ .call(that, null, {result: result});
+ }
}
- });
+ );
});
}

0 comments on commit 825879e

Please sign in to comment.