Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

share/examples/form/combos.html
share/examples/form/combos.js
share/examples/form/composite-field.html
share/examples/form/composite-field.js
share/examples/form/custom-access.html
share/examples/form/custom-access.js
share/examples/form/custom.html
share/examples/form/custom.js
share/examples/form/dynamic.html
share/examples/form/dynamic.js
share/examples/form/file-upload.html
share/examples/form/file-upload.js
share/examples/form/file-upload.php
share/examples/form/form-grid-access.html
share/examples/form/form-grid-access.js
share/examples/form/form-grid.html
share/examples/form/form-grid.js
share/examples/form/forms.css
share/examples/form/forum-search.html
share/examples/form/forum-search.js
share/examples/form/states.js
share/examples/form/vbox-form.html
share/examples/form/vbox-form.js

MANIFEST  view on Meta::CPAN

share/examples/grid/xml-grid.html
share/examples/grid/xml-grid.js
share/examples/grouptabs/grouptabs.html
share/examples/grouptabs/grouptabs.js
share/examples/grouptabs/images/group.png
share/examples/grouptabs/images/subscriptions.png
share/examples/grouptabs/images/templates.png
share/examples/grouptabs/images/tickets.png
share/examples/history/history.html
share/examples/history/history.js
share/examples/image-organizer/SWFUpload/Flash/swfupload.swf
share/examples/image-organizer/SWFUpload/plugins/SWFObject_License.txt
share/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js
share/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js
share/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js
share/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js
share/examples/image-organizer/SWFUpload/swfupload.js
share/examples/image-organizer/SWFUpload/swfupload_license.txt
share/examples/image-organizer/images/icons/arrow_up.png
share/examples/image-organizer/images/icons/box_upload.png
share/examples/image-organizer/images/icons/cancel.png
share/examples/image-organizer/images/icons/folder_add.png
share/examples/image-organizer/images/icons/folder_add_sm.png
share/examples/image-organizer/images/icons/tag_blue_add.png
share/examples/image-organizer/images/selected.gif
share/examples/image-organizer/images/thumbs/kids_hug.jpg
share/examples/image-organizer/images/thumbs/kids_hug2.jpg
share/examples/image-organizer/images/thumbs/sara_pink.jpg
share/examples/image-organizer/images/thumbs/sara_pumpkin.jpg
share/examples/image-organizer/images/thumbs/sara_smile.jpg

MANIFEST  view on Meta::CPAN

share/examples/shared/screens/direct.gif
share/examples/shared/screens/docs.gif
share/examples/shared/screens/editor.gif
share/examples/shared/screens/feeds.gif
share/examples/shared/screens/form-adv-vtypes.gif
share/examples/shared/screens/form-check-radio.gif
share/examples/shared/screens/form-composite.png
share/examples/shared/screens/form-custom-access.gif
share/examples/shared/screens/form-custom.gif
share/examples/shared/screens/form-dynamic.gif
share/examples/shared/screens/form-file-upload.gif
share/examples/shared/screens/form-grid-binding-access.gif
share/examples/shared/screens/form-grid-binding.gif
share/examples/shared/screens/form-multiselect.gif
share/examples/shared/screens/form-slider.png
share/examples/shared/screens/form-spinner.gif
share/examples/shared/screens/form-vbox.gif
share/examples/shared/screens/form-xml.gif
share/examples/shared/screens/forum.gif
share/examples/shared/screens/gmap-panel.gif
share/examples/shared/screens/grid-array.gif

MANIFEST  view on Meta::CPAN

share/examples/ux/css/ColumnNodeUI.css
share/examples/ux/css/GroupSummary.css
share/examples/ux/css/GroupTab.css
share/examples/ux/css/LockingGridView.css
share/examples/ux/css/MultiSelect.css
share/examples/ux/css/PanelResizer.css
share/examples/ux/css/Portal.css
share/examples/ux/css/RowEditor.css
share/examples/ux/css/Spinner.css
share/examples/ux/css/ux-all.css
share/examples/ux/fileuploadfield/FileUploadField.js
share/examples/ux/fileuploadfield/css/fileuploadfield.css
share/examples/ux/gridfilters/GridFilters.js
share/examples/ux/gridfilters/css/GridFilters.css
share/examples/ux/gridfilters/css/RangeMenu.css
share/examples/ux/gridfilters/filter/BooleanFilter.js
share/examples/ux/gridfilters/filter/DateFilter.js
share/examples/ux/gridfilters/filter/Filter.js
share/examples/ux/gridfilters/filter/ListFilter.js
share/examples/ux/gridfilters/filter/NumericFilter.js
share/examples/ux/gridfilters/filter/StringFilter.js
share/examples/ux/gridfilters/images/equals.png

share/docs/extjs/ext-all.js  view on Meta::CPAN

------------------------------------------------------------------------------------------
Commercial and OEM Licenses are available for an alternate download of Ext JS.
This is the appropriate option if you are creating proprietary applications and you are 
not prepared to distribute and share the source code of your application under the 
GPL v3 license. Please visit http://www.sencha.com/license for more details.

--

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS.  See t...
*/
var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=...

share/docs/output/Ext.Ajax.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_Ajax({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.data.Connection","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass firs...

share/docs/output/Ext.Updater.defaults.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_Updater_defaults({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='s...

share/docs/output/Ext.Updater.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_Updater({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.Observable","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass f...

share/docs/output/Ext.data.Connection.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_data_Connection({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.Ajax"],"extends":"Ext.util.Observable","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div...

share/docs/output/Ext.form.BasicForm.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_form_BasicForm({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.Observable","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='sub...

share/docs/output/Ext.form.FormPanel.js  view on Meta::CPAN

packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_form_FormPanel({"alternateClassNames":[],"aliases":{"widget":["form"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.Panel","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div cla...

share/docs/source/Action2.html  view on Meta::CPAN

    },

    // private
    createCallback : function(opts){
        var opts = opts || {};
        return {
            success: this.success,
            failure: this.failure,
            scope: this,
            timeout: (opts.timeout*1000) || (this.form.timeout*1000),
            upload: this.form.fileUpload ? this.success : undefined
        };
    }
};

<span id='Ext-form-Action-Submit'>/**
</span> * @class Ext.form.Action.Submit
 * @extends Ext.form.Action
 * &lt;p&gt;A class which handles submission of data from {@link Ext.form.BasicForm Form}s
 * and processes the returned response.&lt;/p&gt;
 * &lt;p&gt;Instances of this class are only created by a {@link Ext.form.BasicForm Form} when

share/docs/source/BasicForm.html  view on Meta::CPAN

</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='Ext-form-BasicForm-method-constructor'><span id='Ext-form-BasicForm'>/**
</span></span> * @class Ext.form.BasicForm
 * @extends Ext.util.Observable
 * &lt;p&gt;Encapsulates the DOM &amp;lt;form&gt; element at the heart of the {@link Ext.form.FormPanel FormPanel} class, and provides
 * input field management, validation, submission, and form loading services.&lt;/p&gt;
 * &lt;p&gt;By default, Ext Forms are submitted through Ajax, using an instance of {@link Ext.form.Action.Submit}.
 * To enable normal browser submission of an Ext Form, use the {@link #standardSubmit} config option.&lt;/p&gt;
 * &lt;p&gt;&lt;b&gt;&lt;u&gt;File Uploads&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
 * &lt;p&gt;{@link #fileUpload File uploads} are not performed using Ajax submission, that
 * is they are &lt;b&gt;not&lt;/b&gt; performed using XMLHttpRequests. Instead the form is submitted in the standard
 * manner with the DOM &lt;tt&gt;&amp;lt;form&gt;&lt;/tt&gt; element temporarily modified to have its
 * &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
 * to a dynamically generated, hidden &lt;tt&gt;&amp;lt;iframe&gt;&lt;/tt&gt; which is inserted into the document
 * but removed after the return data has been gathered.&lt;/p&gt;
 * &lt;p&gt;The server response is parsed by the browser to create the document for the IFRAME. If the
 * server is using JSON to send the return object, then the
 * &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17&quot;&gt;Content-Type&lt;/a&gt; header
 * must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.&lt;/p&gt;
 * &lt;p&gt;Characters which are significant to an HTML parser must be sent as HTML entities, so encode
 * &quot;&amp;lt;&quot; as &quot;&amp;amp;lt;&quot;, &quot;&amp;amp;&quot; as &quot;&amp;amp;amp;&quot; etc.&lt;/p&gt;
 * &lt;p&gt;The response text is retrieved from the document, and a fake XMLHttpRequest object
 * is created containing a &lt;tt&gt;responseText&lt;/tt&gt; property in order to conform to the
 * requirements of event handlers and callbacks.&lt;/p&gt;
 * &lt;p&gt;Be aware that file upload packets are sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form&lt;/a&gt;
 * and some server technologies (notably JEE) may require some custom processing in order to
 * retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
 * @constructor
 * @param {Mixed} el The form element or its id
 * @param {Object} config Configuration options
 */
Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {

    constructor: function(el, config){
        Ext.apply(this, config);

share/docs/source/BasicForm.html  view on Meta::CPAN

}
&lt;/code&gt;&lt;/pre&gt;
     */
<span id='Ext-form-BasicForm-cfg-url'>    /**
</span>     * @cfg {String} url
     * The URL to use for form actions if one isn't supplied in the
     * &lt;code&gt;{@link #doAction doAction} options&lt;/code&gt;.
     */
<span id='Ext-form-BasicForm-cfg-fileUpload'>    /**
</span>     * @cfg {Boolean} fileUpload
     * Set to true if this form is a file upload.
     * &lt;p&gt;File uploads are not performed using normal 'Ajax' techniques, that is they are &lt;b&gt;not&lt;/b&gt;
     * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
     * DOM &lt;tt&gt;&amp;lt;form&gt;&lt;/tt&gt; element temporarily modified to have its
     * &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
     * to a dynamically generated, hidden &lt;tt&gt;&amp;lt;iframe&gt;&lt;/tt&gt; which is inserted into the document
     * but removed after the return data has been gathered.&lt;/p&gt;
     * &lt;p&gt;The server response is parsed by the browser to create the document for the IFRAME. If the
     * server is using JSON to send the return object, then the
     * &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17&quot;&gt;Content-Type&lt;/a&gt; header
     * must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.&lt;/p&gt;
     * &lt;p&gt;Characters which are significant to an HTML parser must be sent as HTML entities, so encode
     * &quot;&amp;lt;&quot; as &quot;&amp;amp;lt;&quot;, &quot;&amp;amp;&quot; as &quot;&amp;amp;amp;&quot; etc.&lt;/p&gt;
     * &lt;p&gt;The response text is retrieved from the document, and a fake XMLHttpRequest object
     * is created containing a &lt;tt&gt;responseText&lt;/tt&gt; property in order to conform to the
     * requirements of event handlers and callbacks.&lt;/p&gt;
     * &lt;p&gt;Be aware that file upload packets are sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form&lt;/a&gt;
     * and some server technologies (notably JEE) may require some custom processing in order to
     * retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
     */
<span id='Ext-form-BasicForm-cfg-baseParams'>    /**
</span>     * @cfg {Object} baseParams
     * &lt;p&gt;Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.&lt;/p&gt;
     * &lt;p&gt;Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.&lt;/p&gt;
     */
<span id='Ext-form-BasicForm-cfg-timeout'>    /**
</span>     * @cfg {Number} timeout Timeout for form actions in seconds (default is 30 seconds).

share/docs/source/Connection.html  view on Meta::CPAN

</span></span>     * @class Ext.data.Connection
     * @extends Ext.util.Observable
     * &lt;p&gt;The class encapsulates a connection to the page's originating domain, allowing requests to be made
     * either to a configured URL, or to a URL specified at request time.&lt;/p&gt;
     * &lt;p&gt;Requests made by this class are asynchronous, and will return immediately. No data from
     * the server will be available to the statement immediately following the {@link #request} call.
     * To process returned data, use a
     * &lt;a href=&quot;#request-option-success&quot; ext:member=&quot;request-option-success&quot; ext:cls=&quot;Ext.data.Connection&quot;&gt;success callback&lt;/a&gt;
     * in the request options object,
     * or an {@link #requestcomplete event listener}.&lt;/p&gt;
     * &lt;p&gt;&lt;h3&gt;File Uploads&lt;/h3&gt;&lt;a href=&quot;#request-option-isUpload&quot; ext:member=&quot;request-option-isUpload&quot; ext:cls=&quot;Ext.data.Connection&quot;&gt;File uploads&lt;/a&gt; are not performed using normal &quot;Aja...
     * is they are &lt;b&gt;not&lt;/b&gt; performed using XMLHttpRequests. Instead the form is submitted in the standard
     * manner with the DOM &lt;tt&gt;&amp;lt;form&gt;&lt;/tt&gt; element temporarily modified to have its
     * &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
     * to a dynamically generated, hidden &lt;tt&gt;&amp;lt;iframe&gt;&lt;/tt&gt; which is inserted into the document
     * but removed after the return data has been gathered.&lt;/p&gt;
     * &lt;p&gt;The server response is parsed by the browser to create the document for the IFRAME. If the
     * server is using JSON to send the return object, then the
     * &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17&quot;&gt;Content-Type&lt;/a&gt; header
     * must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.&lt;/p&gt;
     * &lt;p&gt;Characters which are significant to an HTML parser must be sent as HTML entities, so encode
     * &quot;&amp;lt;&quot; as &quot;&amp;amp;lt;&quot;, &quot;&amp;amp;&quot; as &quot;&amp;amp;amp;&quot; etc.&lt;/p&gt;
     * &lt;p&gt;The response text is retrieved from the document, and a fake XMLHttpRequest object
     * is created containing a &lt;tt&gt;responseText&lt;/tt&gt; property in order to conform to the
     * requirements of event handlers and callbacks.&lt;/p&gt;
     * &lt;p&gt;Be aware that file upload packets are sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form&lt;/a&gt;
     * and some server technologies (notably JEE) may require some custom processing in order to
     * retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
     * &lt;p&gt;Also note that it's not possible to check the response code of the hidden iframe, so the success handler will ALWAYS fire.&lt;/p&gt;
     * @constructor
     * @param {Object} config a configuration object.
     */
    Ext.data.Connection = function(config){
        Ext.apply(this, config);
        this.addEvents(
<span id='Ext-data-Connection-event-beforerequest'>            /**

share/docs/source/Connection.html  view on Meta::CPAN

         * &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;scope&lt;/b&gt; : Object (Optional)&lt;div class=&quot;sub-desc&quot;&gt;The scope in
         * which to execute the callbacks: The &quot;this&quot; object for the callback function. If the &lt;tt&gt;url&lt;/tt&gt;, or &lt;tt&gt;params&lt;/tt&gt; options were
         * specified as functions from which to draw values, then this also serves as the scope for those function calls.
         * Defaults to the browser window.&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;timeout&lt;/b&gt; : Number (Optional)&lt;div class=&quot;sub-desc&quot;&gt;The timeout in milliseconds to be used for this request. Defaults to 30 seconds.&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;form&lt;/b&gt; : Element/HTMLElement/String (Optional)&lt;div class=&quot;sub-desc&quot;&gt;The &lt;tt&gt;&amp;lt;form&amp;gt;&lt;/tt&gt;
         * Element or the id of the &lt;tt&gt;&amp;lt;form&amp;gt;&lt;/tt&gt; to pull parameters from.&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;a id=&quot;request-option-isUpload&quot;&gt;&lt;/a&gt;&lt;b&gt;isUpload&lt;/b&gt; : Boolean (Optional)&lt;div class=&quot;sub-desc&quot;&gt;&lt;b&gt;Only meaningful when used
         * with the &lt;tt&gt;form&lt;/tt&gt; option&lt;/b&gt;.
         * &lt;p&gt;True if the form object is a file upload (will be set automatically if the form was
         * configured with &lt;b&gt;&lt;tt&gt;enctype&lt;/tt&gt;&lt;/b&gt; &quot;multipart/form-data&quot;).&lt;/p&gt;
         * &lt;p&gt;File uploads are not performed using normal &quot;Ajax&quot; techniques, that is they are &lt;b&gt;not&lt;/b&gt;
         * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
         * DOM &lt;tt&gt;&amp;lt;form&gt;&lt;/tt&gt; element temporarily modified to have its
         * &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
         * to a dynamically generated, hidden &lt;tt&gt;&amp;lt;iframe&gt;&lt;/tt&gt; which is inserted into the document
         * but removed after the return data has been gathered.&lt;/p&gt;
         * &lt;p&gt;The server response is parsed by the browser to create the document for the IFRAME. If the
         * server is using JSON to send the return object, then the
         * &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17&quot;&gt;Content-Type&lt;/a&gt; header
         * must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.&lt;/p&gt;
         * &lt;p&gt;The response text is retrieved from the document, and a fake XMLHttpRequest object
         * is created containing a &lt;tt&gt;responseText&lt;/tt&gt; property in order to conform to the
         * requirements of event handlers and callbacks.&lt;/p&gt;
         * &lt;p&gt;Be aware that file upload packets are sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form&lt;/a&gt;
         * and some server technologies (notably JEE) may require some custom processing in order to
         * retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
         * &lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;headers&lt;/b&gt; : Object (Optional)&lt;div class=&quot;sub-desc&quot;&gt;Request
         * headers to set for the request.&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;xmlData&lt;/b&gt; : Object (Optional)&lt;div class=&quot;sub-desc&quot;&gt;XML document
         * to use for the post. Note: This will be used instead of params for the post
         * data. Any params will be appended to the URL.&lt;/div&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;jsonData&lt;/b&gt; : Object/String (Optional)&lt;div class=&quot;sub-desc&quot;&gt;JSON
         * data to use as the post. Note: This will be used instead of params for the post

share/docs/source/Form.html  view on Meta::CPAN

 * &lt;p&gt;&lt;b&gt;&lt;u&gt;Layout&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
 * &lt;p&gt;By default, FormPanel is configured with &lt;tt&gt;layout:'form'&lt;/tt&gt; to use an {@link Ext.layout.FormLayout}
 * layout manager, which styles and renders fields and labels correctly. When nesting additional Containers
 * within a FormPanel, you should ensure that any descendant Containers which host input Fields use the
 * {@link Ext.layout.FormLayout} layout manager.&lt;/p&gt;
 *
 * &lt;p&gt;&lt;b&gt;&lt;u&gt;BasicForm&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
 * &lt;p&gt;Although &lt;b&gt;not listed&lt;/b&gt; as configuration options of FormPanel, the FormPanel class accepts all
 * of the config options required to configure its internal {@link Ext.form.BasicForm} for:
 * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
 * &lt;li&gt;{@link Ext.form.BasicForm#fileUpload file uploads}&lt;/li&gt;
 * &lt;li&gt;functionality for {@link Ext.form.BasicForm#doAction loading, validating and submitting} the form&lt;/li&gt;
 * &lt;/ul&gt;&lt;/div&gt;
 *
 * &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: If subclassing FormPanel, any configuration options for the BasicForm must be applied to
 * the &lt;tt&gt;&lt;b&gt;initialConfig&lt;/b&gt;&lt;/tt&gt; property of the FormPanel. Applying {@link Ext.form.BasicForm BasicForm}
 * configuration settings to &lt;b&gt;&lt;tt&gt;this&lt;/tt&gt;&lt;/b&gt; will &lt;b&gt;not&lt;/b&gt; affect the BasicForm's configuration.&lt;/p&gt;
 *
 * &lt;p&gt;&lt;b&gt;&lt;u&gt;Form Validation&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
 * &lt;p&gt;For information on form validation see the following:&lt;/p&gt;
 * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;

share/docs/source/UpdateManager.html  view on Meta::CPAN

</span>                 * @event failure
                 * Fired on update failure.
                 * @param {Ext.Element} el
                 * @param {Object} oResponseObject The response Object
                 */
                FAILURE
            );

            Ext.apply(me, Ext.Updater.defaults);
<span id='Ext-Updater-property-sslBlankUrl'>            /**
</span>             * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}).
             * @property sslBlankUrl
             * @type String
             */
<span id='Ext-Updater-property-disableCaching'>            /**
</span>             * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}).
             * @property disableCaching
             * @type Boolean
             */
<span id='Ext-Updater-property-indicatorText'>            /**
</span>             * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}).

share/docs/source/UpdateManager.html  view on Meta::CPAN

                        &quot;params&quot;: params
                    }
                }, cfg);

                me.transaction = Ext.Ajax.request(o);
            }
        },

<span id='Ext-Updater-method-formUpdate'>        /**
</span>         * &lt;p&gt;Performs an asynchronous form post, updating this element with the response. If the form has the attribute
         * enctype=&quot;&lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form-data&lt;/a&gt;&quot;, it assumes it's a file upload.
         * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.&lt;/p&gt;
         * &lt;p&gt;File uploads are not performed using normal &quot;Ajax&quot; techniques, that is they are &lt;b&gt;not&lt;/b&gt;
         * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
         * DOM &lt;code&gt;&amp;lt;form&gt;&lt;/code&gt; element temporarily modified to have its
         * &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
         * to a dynamically generated, hidden &lt;code&gt;&amp;lt;iframe&gt;&lt;/code&gt; which is inserted into the document
         * but removed after the return data has been gathered.&lt;/p&gt;
         * &lt;p&gt;Be aware that file upload packets, sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form-data&lt;/a&gt;
         * and some server technologies (notably JEE) may require some custom processing in order to
         * retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
         * @param {String/HTMLElement} form The form Id or form element
         * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used.
         * @param {Boolean} reset (optional) Whether to try to reset the form after the update
         * @param {Function} callback (optional) Callback when transaction is complete. The following
         * parameters are passed:&lt;ul&gt;
         * &lt;li&gt;&lt;b&gt;el&lt;/b&gt; : Ext.Element&lt;p class=&quot;sub-desc&quot;&gt;The Element being updated.&lt;/p&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;success&lt;/b&gt; : Boolean&lt;p class=&quot;sub-desc&quot;&gt;True for success, false for failure.&lt;/p&gt;&lt;/li&gt;
         * &lt;li&gt;&lt;b&gt;response&lt;/b&gt; : XMLHttpRequest&lt;p class=&quot;sub-desc&quot;&gt;The XMLHttpRequest which processed the update.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;

share/docs/source/UpdateManager.html  view on Meta::CPAN

</span>     * Text for loading indicator (defaults to '&amp;lt;div class=&quot;loading-indicator&quot;&amp;gt;Loading...&amp;lt;/div&amp;gt;').
     * @type String
     */
    indicatorText : '&lt;div class=&quot;loading-indicator&quot;&gt;Loading...&lt;/div&gt;',
<span id='Ext-Updater-defaults-property-loadScripts'>     /**
</span>     * True to process scripts by default (defaults to false).
     * @type Boolean
     */
    loadScripts : false,
<span id='Ext-Updater-defaults-property-sslBlankUrl'>    /**
</span>    * Blank page URL to use with SSL file uploads (defaults to {@link Ext#SSL_SECURE_URL} if set, or &quot;javascript:false&quot;).
    * @type String
    */
    sslBlankUrl : Ext.SSL_SECURE_URL
};


<span id='Ext-Updater-static-method-updateElement'>/**
</span> * Static convenience method. &lt;b&gt;This method is deprecated in favor of el.load({url:'foo.php', ...})&lt;/b&gt;.
 * Usage:
 * &lt;pre&gt;&lt;code&gt;Ext.Updater.updateElement(&quot;my-div&quot;, &quot;stuff.php&quot;);&lt;/code&gt;&lt;/pre&gt;

share/examples/data.js  view on Meta::CPAN

        url:  'form/adv-vtypes.html',
        icon: 'form-adv-vtypes.gif',
        desc: 'Relational form field validation using custom vtypes.'
    },{
        text: 'Checkbox/Radio Groups',
        url:  'form/check-radio.html',
        icon: 'form-check-radio.gif',
        desc: 'Many examples showing different checkbox and radio group configurations.'
    },{
        text: 'File Upload Field',
        url:  'form/file-upload.html',
        icon: 'form-file-upload.gif',
        desc: 'A demo of how to give standard file upload fields a bit of Ext style using a custom class.'
    },{
        text: 'Spinner Field',
        url:  'spinner/spinner.html',
        icon: 'form-spinner.gif',
        desc: 'An example of a custom spinner widget.'
    },{
        text: 'MultiSelect and ItemSelector',
        url:  'multiselect/multiselect-demo.html',
        icon: 'form-multiselect.gif',
        desc: 'Example controls for selecting a list of items in forms.'

share/examples/direct/php/router.php  view on Meta::CPAN

$isUpload = false;
if(isset($HTTP_RAW_POST_DATA)){
	header('Content-Type: text/javascript');
	$data = json_decode($HTTP_RAW_POST_DATA);
}else if(isset($_POST['extAction'])){ // form post
	$isForm = true;
	$isUpload = $_POST['extUpload'] == 'true';
	$data = new BogusAction();
	$data->action = $_POST['extAction'];
	$data->method = $_POST['extMethod'];
    $data->tid = isset($_POST['extTID']) ? $_POST['extTID'] : null; // not set for upload
	$data->data = array($_POST, $_FILES);
}else{
	die('Invalid request.');
}

function doRpc($cdata){
    global $API;
	try {
		if(!isset($API[$cdata->action])){
			throw new Exception('Call to undefined action: ' . $cdata->action);

share/examples/form/file-upload.html  view on Meta::CPAN

    <title>File Upload Field Example</title>

    <!-- ** CSS ** -->
    <!-- base library -->
    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

    <!-- overrides to base library -->

    <!-- page specific -->
    <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
    <link rel="stylesheet" type="text/css" href="../ux/fileuploadfield/css/fileuploadfield.css"/>

    <style type=text/css>
        .upload-icon {
            background: url('../shared/icons/fam/image_add.png') no-repeat 0 0 !important;
        }
        #fi-button-msg {
            border: 2px solid #ccc;
            padding: 5px 10px;
            background: #eee;
            margin: 5px;
            float: left;
        }
    </style>

    <!-- ** Javascript ** -->
    <!-- ExtJS library: base/adapter -->
    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>

    <!-- ExtJS library: all widgets -->
    <script type="text/javascript" src="../../ext-all.js"></script>

    <!-- overrides to base library -->
    <script type="text/javascript" src="../ux/fileuploadfield/FileUploadField.js"></script>

    <!-- page specific -->
    <script type="text/javascript" src="file-upload.js"></script>

</head>
<body>
    <h1>File Upload Field</h1>
    <p>This example utilizes a custom extension to implement a file upload field.
    The js is not minified so it is readable. See <a href="file-upload.js">file-input.js</a> and
    <a href="../ux/fileuploadfield/FileUploadField.js">FileUploadField.js</a>.</p>

    <p>
        <b>Basic FileUpload</b><br />
        A typical file upload field with Ext style.  Direct editing of the text field cannot be done in a
        consistent, cross-browser way, so it is always read-only in this implementation.
        <div id="fi-basic"></div>
        <div id="fi-basic-btn"></div>
    </p>

    <p>
        <b>Basic FileUpload (Button-only)</b><br />
        You can also render the file input as a button without the text field, with access to the field's value via the
        standard <tt>Ext.form.TextField</tt> interface or by handling the <tt>fileselected</tt> event (as in this example).
        <div id="fi-button"></div>
        <div id="fi-button-msg" style="display:none;"></div>
        <div class="x-clear"></div>
    </p>

    <p>
        <b>Form Example</b><br />
        The FileUploadField can also be used in standard form layouts, with support for anchoring, validation (the
        field is required in this example), empty text, etc.  This example also demonstrates using the
        <tt>buttonCfg</tt> option to provide a customized icon upload button.
        <div id="fi-form"></div>
    </p>
</body>
</html>

share/examples/form/file-upload.js  view on Meta::CPAN

        labelWidth: 50,
        defaults: {
            anchor: '95%',
            allowBlank: false,
            msgTarget: 'side'
        },
        items: [{
            xtype: 'textfield',
            fieldLabel: 'Name'
        },{
            xtype: 'fileuploadfield',
            id: 'form-file',
            emptyText: 'Select an image',
            fieldLabel: 'Photo',
            name: 'photo-path',
            buttonText: '',
            buttonCfg: {
                iconCls: 'upload-icon'
            }
        }],
        buttons: [{
            text: 'Save',
            handler: function(){
                if(fp.getForm().isValid()){
	                fp.getForm().submit({
	                    url: 'file-upload.php',
	                    waitMsg: 'Uploading your photo...',
	                    success: function(fp, o){
	                        msg('Success', 'Processed file "'+o.result.file+'" on the server');
	                    }
	                });
                }
            }
        },{
            text: 'Reset',
            handler: function(){

share/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js  view on Meta::CPAN

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
/*
	Queue Plug-in
	
	Features:
		*Adds a cancelQueue() method for cancelling the entire queue.
		*All queued files are uploaded when startUpload() is called.
		*If false is returned from uploadComplete then the queue upload is stopped.
		 If false is not returned (strict comparison) then the queue upload is continued.
		*Adds a QueueComplete event that is fired when all the queued files have finished uploading.
		 Set the event handler with the queue_complete_handler setting.
		
	*/

var SWFUpload;
if (typeof(SWFUpload) === "function") {
	SWFUpload.queue = {};
	
	SWFUpload.prototype.initSettings = (function (oldInitSettings) {
		return function () {
			if (typeof(oldInitSettings) === "function") {
				oldInitSettings.call(this);
			}
			
			this.queueSettings = {};
			
			this.queueSettings.queue_cancelled_flag = false;
			this.queueSettings.queue_upload_count = 0;
			
			this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
			this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
			this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
			this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
			
			this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
		};
	})(SWFUpload.prototype.initSettings);

	SWFUpload.prototype.startUpload = function (fileID) {
		this.queueSettings.queue_cancelled_flag = false;
		this.callFlash("StartUpload", [fileID]);
	};

share/examples/image-organizer/SWFUpload/plugins/swfupload.queue.js  view on Meta::CPAN

		this.queueSettings.queue_cancelled_flag = true;
		this.stopUpload();
		
		var stats = this.getStats();
		while (stats.files_queued > 0) {
			this.cancelUpload();
			stats = this.getStats();
		}
	};
	
	SWFUpload.queue.uploadStartHandler = function (file) {
		var returnValue;
		if (typeof(this.queueSettings.user_upload_start_handler) === "function") {
			returnValue = this.queueSettings.user_upload_start_handler.call(this, file);
		}
		
		// To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value.
		returnValue = (returnValue === false) ? false : true;
		
		this.queueSettings.queue_cancelled_flag = !returnValue;

		return returnValue;
	};
	
	SWFUpload.queue.uploadCompleteHandler = function (file) {
		var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
		var continueUpload;
		
		if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
			this.queueSettings.queue_upload_count++;
		}

		if (typeof(user_upload_complete_handler) === "function") {
			continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
		} else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
			// If the file was stopped and re-queued don't restart the upload
			continueUpload = false;
		} else {
			continueUpload = true;
		}
		
		if (continueUpload) {
			var stats = this.getStats();
			if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) {
				this.startUpload();
			} else if (this.queueSettings.queue_cancelled_flag === false) {
				this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
				this.queueSettings.queue_upload_count = 0;
			} else {
				this.queueSettings.queue_cancelled_flag = false;
				this.queueSettings.queue_upload_count = 0;
			}
		}
	};
}

share/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js  view on Meta::CPAN


If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
/*
	Speed Plug-in
	
	Features:
		*Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc.
			- currentSpeed -- String indicating the upload speed, bytes per second
			- averageSpeed -- Overall average upload speed, bytes per second
			- movingAverageSpeed -- Speed over averaged over the last several measurements, bytes per second
			- timeRemaining -- Estimated remaining upload time in seconds
			- timeElapsed -- Number of seconds passed for this upload
			- percentUploaded -- Percentage of the file uploaded (0 to 100)
			- sizeUploaded -- Formatted size uploaded so far, bytes
		
		*Adds setting 'moving_average_history_size' for defining the window size used to calculate the moving average speed.
		
		*Adds several Formatting functions for formatting that values provided on the file object.
			- SWFUpload.speed.formatBPS(bps) -- outputs string formatted in the best units (Gbps, Mbps, Kbps, bps)
			- SWFUpload.speed.formatTime(seconds) -- outputs string formatted in the best units (x Hr y M z S)
			- SWFUpload.speed.formatSize(bytes) -- outputs string formatted in the best units (w GB x MB y KB z B )
			- SWFUpload.speed.formatPercent(percent) -- outputs string formatted with a percent sign (x.xx %)
			- SWFUpload.speed.formatUnits(baseNumber, divisionArray, unitLabelArray, fractionalBoolean)
				- Formats a number using the division array to determine how to apply the labels in the Label Array

share/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js  view on Meta::CPAN

			};

			// List used to keep the speed stats for the files we are tracking
			this.fileSpeedStats = {};
			this.speedSettings = {};

			this.ensureDefault("moving_average_history_size", "10");
			
			this.speedSettings.user_file_queued_handler = this.settings.file_queued_handler;
			this.speedSettings.user_file_queue_error_handler = this.settings.file_queue_error_handler;
			this.speedSettings.user_upload_start_handler = this.settings.upload_start_handler;
			this.speedSettings.user_upload_error_handler = this.settings.upload_error_handler;
			this.speedSettings.user_upload_progress_handler = this.settings.upload_progress_handler;
			this.speedSettings.user_upload_success_handler = this.settings.upload_success_handler;
			this.speedSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
			
			this.settings.file_queued_handler = SWFUpload.speed.fileQueuedHandler;
			this.settings.file_queue_error_handler = SWFUpload.speed.fileQueueErrorHandler;
			this.settings.upload_start_handler = SWFUpload.speed.uploadStartHandler;
			this.settings.upload_error_handler = SWFUpload.speed.uploadErrorHandler;
			this.settings.upload_progress_handler = SWFUpload.speed.uploadProgressHandler;
			this.settings.upload_success_handler = SWFUpload.speed.uploadSuccessHandler;
			this.settings.upload_complete_handler = SWFUpload.speed.uploadCompleteHandler;
			
			delete this.ensureDefault;
		};
	})(SWFUpload.prototype.initSettings);

	
	SWFUpload.speed.fileQueuedHandler = function (file) {
		if (typeof this.speedSettings.user_file_queued_handler === "function") {
			file = SWFUpload.speed.extendFile(file);
			

share/examples/image-organizer/SWFUpload/plugins/swfupload.speed.js  view on Meta::CPAN

	};
	
	SWFUpload.speed.fileQueueErrorHandler = function (file, errorCode, message) {
		if (typeof this.speedSettings.user_file_queue_error_handler === "function") {
			file = SWFUpload.speed.extendFile(file);
			
			return this.speedSettings.user_file_queue_error_handler.call(this, file, errorCode, message);
		}
	};

	SWFUpload.speed.uploadStartHandler = function (file) {
		if (typeof this.speedSettings.user_upload_start_handler === "function") {
			file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
			return this.speedSettings.user_upload_start_handler.call(this, file);
		}
	};
	
	SWFUpload.speed.uploadErrorHandler = function (file, errorCode, message) {
		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
		SWFUpload.speed.removeTracking(file, this.fileSpeedStats);

		if (typeof this.speedSettings.user_upload_error_handler === "function") {
			return this.speedSettings.user_upload_error_handler.call(this, file, errorCode, message);
		}
	};
	SWFUpload.speed.uploadProgressHandler = function (file, bytesComplete, bytesTotal) {
		this.updateTracking(file, bytesComplete);
		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);

		if (typeof this.speedSettings.user_upload_progress_handler === "function") {
			return this.speedSettings.user_upload_progress_handler.call(this, file, bytesComplete, bytesTotal);
		}
	};
	
	SWFUpload.speed.uploadSuccessHandler = function (file, serverData) {
		if (typeof this.speedSettings.user_upload_success_handler === "function") {
			file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
			return this.speedSettings.user_upload_success_handler.call(this, file, serverData);
		}
	};
	SWFUpload.speed.uploadCompleteHandler = function (file) {
		file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
		SWFUpload.speed.removeTracking(file, this.fileSpeedStats);

		if (typeof this.speedSettings.user_upload_complete_handler === "function") {
			return this.speedSettings.user_upload_complete_handler.call(this, file);
		}
	};
	
	// Private: extends the file object with the speed plugin values
	SWFUpload.speed.extendFile = function (file, trackingList) {
		var tracking;
		
		if (trackingList) {
			tracking = trackingList[file.id];
		}

share/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js  view on Meta::CPAN

Build date: 2013-04-03 15:07:25
*/
/*
	SWFUpload.SWFObject Plugin

	Summary:
		This plugin uses SWFObject to embed SWFUpload dynamically in the page.  SWFObject provides accurate Flash Player detection and DOM Ready loading.
		This plugin replaces the Graceful Degradation plugin.

	Features:
		* swfupload_load_failed_hander event
		* swfupload_pre_load_handler event
		* minimum_flash_version setting (default: "9.0.28")
		* SWFUpload.onload event for early loading

	Usage:
		Provide handlers and settings as needed.  When using the SWFUpload.SWFObject plugin you should initialize SWFUploading
		in SWFUpload.onload rather than in window.onload.  When initialized this way SWFUpload can load earlier preventing the UI flicker
		that was seen using the Graceful Degradation plugin.

		<script type="text/javascript">
			var swfu;
			SWFUpload.onload = function () {
				swfu = new SWFUpload({
					minimum_flash_version: "9.0.28",
					swfupload_pre_load_handler: swfuploadPreLoad,
					swfupload_load_failed_handler: swfuploadLoadFailed
				});
			};
		</script>
		
	Notes:
		You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8.
		The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met.  Other issues such as missing SWF files, browser bugs
		 or corrupt Flash Player installations will not trigger this event.
		The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found.  It does not wait for SWFUpload to load and can
		 be used to prepare the SWFUploadUI and hide alternate content.
		swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser.
		 Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made.
*/


/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/

share/examples/image-organizer/SWFUpload/plugins/swfupload.swfobject.js  view on Meta::CPAN

		return function () {
			if (typeof(oldInitSettings) === "function") {
				oldInitSettings.call(this);
			}

			this.ensureDefault = function (settingName, defaultValue) {
				this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
			};

			this.ensureDefault("minimum_flash_version", "9.0.28");
			this.ensureDefault("swfupload_pre_load_handler", null);
			this.ensureDefault("swfupload_load_failed_handler", null);

			delete this.ensureDefault;

		};
	})(SWFUpload.prototype.initSettings);


	SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
		return function () {
			var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
			
			if (hasFlash) {
				this.queueEvent("swfupload_pre_load_handler");
				if (typeof(oldLoadFlash) === "function") {
					oldLoadFlash.call(this);
				}
			} else {
				this.queueEvent("swfupload_load_failed_handler");
			}
		};
		
	}(SWFUpload.prototype.loadFlash);
			
	SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) {
		return function () {
			if (typeof(oldDisplayDebugInfo) === "function") {
				oldDisplayDebugInfo.call(this);
			}
			
			this.debug(
				[
					"SWFUpload.SWFObject Plugin settings:", "\n",
					"\t", "minimum_flash_version:                      ", this.settings.minimum_flash_version, "\n",
					"\t", "swfupload_pre_load_handler assigned:     ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n",
					"\t", "swfupload_load_failed_handler assigned:     ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n",
				].join("")
			);
		};	
	}(SWFUpload.prototype.displayDebugInfo);
}

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN


Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
/**
 * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
 *
 * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
 *
 * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */


share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

/* ******************** */

// Private: initSettings ensures that all the
// settings are set, getting a default value if one was not assigned.
SWFUpload.prototype.initSettings = function () {
	this.ensureDefault = function (settingName, defaultValue) {
		this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
	};
	
	// Upload backend settings
	this.ensureDefault("upload_url", "");
	this.ensureDefault("preserve_relative_urls", false);
	this.ensureDefault("file_post_name", "Filedata");
	this.ensureDefault("post_params", {});
	this.ensureDefault("use_query_string", false);
	this.ensureDefault("requeue_on_error", false);
	this.ensureDefault("http_success", []);
	this.ensureDefault("assume_success_timeout", 0);
	
	// File Settings
	this.ensureDefault("file_types", "*.*");
	this.ensureDefault("file_types_description", "All Files");
	this.ensureDefault("file_size_limit", 0);	// Default zero means "unlimited"
	this.ensureDefault("file_upload_limit", 0);
	this.ensureDefault("file_queue_limit", 0);

	// Flash Settings
	this.ensureDefault("flash_url", "swfupload.swf");
	this.ensureDefault("prevent_swf_caching", true);
	
	// Button Settings
	this.ensureDefault("button_image_url", "");
	this.ensureDefault("button_width", 1);
	this.ensureDefault("button_height", 1);
	this.ensureDefault("button_text", "");
	this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
	this.ensureDefault("button_text_top_padding", 0);
	this.ensureDefault("button_text_left_padding", 0);

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

	this.ensureDefault("button_placeholder_id", "");
	this.ensureDefault("button_placeholder", null);
	this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
	this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
	
	// Debug Settings
	this.ensureDefault("debug", false);
	this.settings.debug_enabled = this.settings.debug;	// Here to maintain v2 API
	
	// Event Handlers
	this.settings.return_upload_start_handler = this.returnUploadStart;
	this.ensureDefault("swfupload_loaded_handler", null);
	this.ensureDefault("file_dialog_start_handler", null);
	this.ensureDefault("file_queued_handler", null);
	this.ensureDefault("file_queue_error_handler", null);
	this.ensureDefault("file_dialog_complete_handler", null);
	
	this.ensureDefault("upload_start_handler", null);
	this.ensureDefault("upload_progress_handler", null);
	this.ensureDefault("upload_error_handler", null);
	this.ensureDefault("upload_success_handler", null);
	this.ensureDefault("upload_complete_handler", null);
	
	this.ensureDefault("debug_handler", this.debugMessage);

	this.ensureDefault("custom_settings", {});

	// Other settings
	this.customSettings = this.settings.custom_settings;
	
	// Update the flash url if needed
	if (!!this.settings.prevent_swf_caching) {
		this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
	}
	
	if (!this.settings.preserve_relative_urls) {
		//this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url);	// Don't need to do this one since flash doesn't look at it
		this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
		this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
	}
	
	delete this.ensureDefault;
};

// Private: loadFlash replaces the button_placeholder element with the flash movie.
SWFUpload.prototype.loadFlash = function () {
	var targetElement, tempParent;

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

	// Fix IE Flash/Form bug
	if (window[this.movieName] == undefined) {
		window[this.movieName] = this.getMovieElement();
	}
	
};

// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
SWFUpload.prototype.getFlashHTML = function () {
	// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
	return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
				'<param name="wmode" value="', this.settings.button_window_mode, '" />',
				'<param name="movie" value="', this.settings.flash_url, '" />',
				'<param name="quality" value="high" />',
				'<param name="menu" value="false" />',
				'<param name="allowScriptAccess" value="always" />',
				'<param name="flashvars" value="' + this.getFlashVars() + '" />',
				'</object>'].join("");
};

// Private: getFlashVars builds the parameter string that will be passed
// to flash in the flashvars param.
SWFUpload.prototype.getFlashVars = function () {
	// Build a string from the post param object
	var paramString = this.buildParamString();
	var httpSuccessString = this.settings.http_success.join(",");
	
	// Build the parameter string
	return ["movieName=", encodeURIComponent(this.movieName),
			"&amp;uploadURL=", encodeURIComponent(this.settings.upload_url),
			"&amp;useQueryString=", encodeURIComponent(this.settings.use_query_string),
			"&amp;requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
			"&amp;httpSuccess=", encodeURIComponent(httpSuccessString),
			"&amp;assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
			"&amp;params=", encodeURIComponent(paramString),
			"&amp;filePostName=", encodeURIComponent(this.settings.file_post_name),
			"&amp;fileTypes=", encodeURIComponent(this.settings.file_types),
			"&amp;fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
			"&amp;fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
			"&amp;fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
			"&amp;fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
			"&amp;debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
			"&amp;buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
			"&amp;buttonWidth=", encodeURIComponent(this.settings.button_width),
			"&amp;buttonHeight=", encodeURIComponent(this.settings.button_height),
			"&amp;buttonText=", encodeURIComponent(this.settings.button_text),
			"&amp;buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
			"&amp;buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
			"&amp;buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
			"&amp;buttonAction=", encodeURIComponent(this.settings.button_action),

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

// information about this SWFUpload instance.
// This function (and any references to it) can be deleted when placing
// SWFUpload in production.
SWFUpload.prototype.displayDebugInfo = function () {
	this.debug(
		[
			"---SWFUpload Instance Info---\n",
			"Version: ", SWFUpload.version, "\n",
			"Movie Name: ", this.movieName, "\n",
			"Settings:\n",
			"\t", "upload_url:               ", this.settings.upload_url, "\n",
			"\t", "flash_url:                ", this.settings.flash_url, "\n",
			"\t", "use_query_string:         ", this.settings.use_query_string.toString(), "\n",
			"\t", "requeue_on_error:         ", this.settings.requeue_on_error.toString(), "\n",
			"\t", "http_success:             ", this.settings.http_success.join(", "), "\n",
			"\t", "assume_success_timeout:   ", this.settings.assume_success_timeout, "\n",
			"\t", "file_post_name:           ", this.settings.file_post_name, "\n",
			"\t", "post_params:              ", this.settings.post_params.toString(), "\n",
			"\t", "file_types:               ", this.settings.file_types, "\n",
			"\t", "file_types_description:   ", this.settings.file_types_description, "\n",
			"\t", "file_size_limit:          ", this.settings.file_size_limit, "\n",
			"\t", "file_upload_limit:        ", this.settings.file_upload_limit, "\n",
			"\t", "file_queue_limit:         ", this.settings.file_queue_limit, "\n",
			"\t", "debug:                    ", this.settings.debug.toString(), "\n",

			"\t", "prevent_swf_caching:      ", this.settings.prevent_swf_caching.toString(), "\n",

			"\t", "button_placeholder_id:    ", this.settings.button_placeholder_id.toString(), "\n",
			"\t", "button_placeholder:       ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
			"\t", "button_image_url:         ", this.settings.button_image_url.toString(), "\n",
			"\t", "button_width:             ", this.settings.button_width.toString(), "\n",
			"\t", "button_height:            ", this.settings.button_height.toString(), "\n",
			"\t", "button_text:              ", this.settings.button_text.toString(), "\n",
			"\t", "button_text_style:        ", this.settings.button_text_style.toString(), "\n",
			"\t", "button_text_top_padding:  ", this.settings.button_text_top_padding.toString(), "\n",
			"\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
			"\t", "button_action:            ", this.settings.button_action.toString(), "\n",
			"\t", "button_disabled:          ", this.settings.button_disabled.toString(), "\n",

			"\t", "custom_settings:          ", this.settings.custom_settings.toString(), "\n",
			"Event Handlers:\n",
			"\t", "swfupload_loaded_handler assigned:  ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
			"\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
			"\t", "file_queued_handler assigned:       ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
			"\t", "file_queue_error_handler assigned:  ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
			"\t", "upload_start_handler assigned:      ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
			"\t", "upload_progress_handler assigned:   ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
			"\t", "upload_error_handler assigned:      ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
			"\t", "upload_success_handler assigned:    ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
			"\t", "upload_complete_handler assigned:   ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
			"\t", "debug_handler assigned:             ", (typeof this.settings.debug_handler === "function").toString(), "\n"
		].join("")
	);
};

/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
	the maintain v2 API compatibility
*/
// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
SWFUpload.prototype.addSetting = function (name, value, default_value) {

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

// Public: selectFiles causes a File Selection Dialog window to appear/ This
// dialog allows the user to select any number of files
// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
// If the selection name length is too long the dialog will fail in an unpredictable manner.  There is no work-around
// for this bug.
SWFUpload.prototype.selectFiles = function () {
	this.callFlash("SelectFiles");
};


// Public: startUpload starts uploading the first file in the queue unless
// the optional parameter 'fileID' specifies the ID 
SWFUpload.prototype.startUpload = function (fileID) {
	this.callFlash("StartUpload", [fileID]);
};

// Public: cancelUpload cancels any queued file.  The fileID parameter may be the file ID or index.
// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
	if (triggerErrorEvent !== false) {
		triggerErrorEvent = true;
	}
	this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
};

// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
// If nothing is currently uploading then nothing happens.
SWFUpload.prototype.stopUpload = function () {
	this.callFlash("StopUpload");
};

/* ************************
 * Settings methods
 *   These methods change the SWFUpload settings.
 *   SWFUpload settings should not be changed directly on the settings object
 *   since many of the settings need to be passed to Flash in order to take
 *   effect.
 * *********************** */

// Public: getStats gets the file statistics object.
SWFUpload.prototype.getStats = function () {
	return this.callFlash("GetStats");
};

// Public: setStats changes the SWFUpload statistics.  You shouldn't need to 
// change the statistics but you can.  Changing the statistics does not
// affect SWFUpload accept for the successful_uploads count which is used
// by the upload_limit setting to determine how many files the user may upload.
SWFUpload.prototype.setStats = function (statsObject) {
	this.callFlash("SetStats", [statsObject]);
};

// Public: getFile retrieves a File object by ID or Index.  If the file is
// not found then 'null' is returned.
SWFUpload.prototype.getFile = function (fileID) {
	if (typeof(fileID) === "number") {
		return this.callFlash("GetFileByIndex", [fileID]);
	} else {

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

SWFUpload.prototype.addFileParam = function (fileID, name, value) {
	return this.callFlash("AddFileParam", [fileID, name, value]);
};

// Public: removeFileParam removes a previously set (by addFileParam) name/value
// pair from the specified file.
SWFUpload.prototype.removeFileParam = function (fileID, name) {
	this.callFlash("RemoveFileParam", [fileID, name]);
};

// Public: setUploadUrl changes the upload_url setting.
SWFUpload.prototype.setUploadURL = function (url) {
	this.settings.upload_url = url.toString();
	this.callFlash("SetUploadURL", [url]);
};

// Public: setPostParams changes the post_params setting
SWFUpload.prototype.setPostParams = function (paramsObject) {
	this.settings.post_params = paramsObject;
	this.callFlash("SetPostParams", [paramsObject]);
};

// Public: addPostParam adds post name/value pair.  Each name can have only one value.

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

	this.settings.file_types_description = description;
	this.callFlash("SetFileTypes", [types, description]);
};

// Public: setFileSizeLimit changes the file_size_limit setting
SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
	this.settings.file_size_limit = fileSizeLimit;
	this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
};

// Public: setFileUploadLimit changes the file_upload_limit setting
SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
	this.settings.file_upload_limit = fileUploadLimit;
	this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
};

// Public: setFileQueueLimit changes the file_queue_limit setting
SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
	this.settings.file_queue_limit = fileQueueLimit;
	this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
};

// Public: setFilePostName changes the file_post_name setting

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
SWFUpload.prototype.testExternalInterface = function () {
	try {
		return this.callFlash("TestExternalInterface");
	} catch (ex) {
		return false;
	}
};

// Private: This event is called by Flash when it has finished loading. Don't modify this.
// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
SWFUpload.prototype.flashReady = function () {
	// Check that the movie element is loaded correctly with its ExternalInterface methods defined
	var movieElement = this.getMovieElement();

	if (!movieElement) {
		this.debug("Flash called back ready but the flash movie can't be found.");
		return;
	}

	this.cleanUp(movieElement);
	
	this.queueEvent("swfupload_loaded_handler");
};

// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
// This function is called by Flash each time the ExternalInterface functions are created.
SWFUpload.prototype.cleanUp = function (movieElement) {
	// Pro-actively unhook all the Flash functions
	try {
		if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
			this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
			for (var key in movieElement) {

share/examples/image-organizer/SWFUpload/swfupload.js  view on Meta::CPAN

};


/* Handle errors that occur when an attempt to queue a file fails. */
SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
};

/* Called after the file dialog has closed and the selected files have been queued.
	You could call startUpload here if you want the queued files to begin uploading immediately. */
SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
	this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
};

SWFUpload.prototype.uploadStart = function (file) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("return_upload_start_handler", file);
};

SWFUpload.prototype.returnUploadStart = function (file) {
	var returnValue;
	if (typeof this.settings.upload_start_handler === "function") {
		file = this.unescapeFilePostParams(file);
		returnValue = this.settings.upload_start_handler.call(this, file);
	} else if (this.settings.upload_start_handler != undefined) {
		throw "upload_start_handler must be a function";
	}

	// Convert undefined to true so if nothing is returned from the upload_start_handler it is
	// interpretted as 'true'.
	if (returnValue === undefined) {
		returnValue = true;
	}
	
	returnValue = !!returnValue;
	
	this.callFlash("ReturnUploadStart", [returnValue]);
};



SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
};

SWFUpload.prototype.uploadError = function (file, errorCode, message) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_error_handler", [file, errorCode, message]);
};

SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
};

SWFUpload.prototype.uploadComplete = function (file) {
	file = this.unescapeFilePostParams(file);
	this.queueEvent("upload_complete_handler", file);
};

/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
   internal debug console.  You can override this event and have messages written where you want. */
SWFUpload.prototype.debug = function (message) {
	this.queueEvent("debug_handler", message);
};


/* **********************************

share/examples/image-organizer/SWFUpload/swfupload_license.txt  view on Meta::CPAN

/**
 * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
 *
 * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/
 *
 * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

share/examples/image-organizer/img-org.css  view on Meta::CPAN

    text-align: center;
}

.images-view div.x-view-selected {
    background-color: #99BBE8;
}

.album-node .x-tree-node-icon, .album-btn{
    background-image:url( ../tree/album.gif ) !important;
}
div.upload-file {
    border-bottom: 1px solid #99BBE8;
    padding: 10px;
}
div.upload-file-selected {
    background:#EFF5FB url(../view/images/selected.gif) repeat-x;
}
div.upload-name {
    width: 300px;
    float: left;
}
div.upload-pb {
    width: 300px;
    float: left;
}
div.upload-info, div.album-details {
    color: gray;
    font-size: smaller;
}

.image-prop-header {
    padding-left: 10px;
    padding-top: 10px;
    border-bottom: 1px solid #99BBE8;
}

share/examples/image-organizer/img-org.css  view on Meta::CPAN

div.album-wrap {
    background-color: #EFF5FB;
    padding: 1em;
    text-align: center;
    margin:3px;
    border: 1px solid #99BBE8;
    height: 150px;
}

/* Toolbar Icons */
.upload {
    background-image: url(images/icons/box_upload.png) !important;
}
.add {
    background-image: url(images/icons/folder_add.png) !important;
}
.start-upload {
    background-image: url(images/icons/arrow_up.png) !important;
}
.cancel {
    background-image: url(images/icons/cancel.png) !important;
}
.album-add {
    background-image: url(images/icons/folder_add_sm.png) !important;
}
.tag {
    background-image: url(images/icons/tag_blue_add.png) !important;

share/examples/image-organizer/imgorg/App.js  view on Meta::CPAN

requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
/*
 * Sample Image Organizer utilizing Ext.Direct
 * Tagging/Organizing into galleries
 * Image uploading
 */

Ext.ns('Imgorg','Imgorg.App');
Imgorg.App = function() {
    var swfu;
    SWFUpload.onload = function() {
        var settings = {
            flash_url: "SWFUpload/Flash/swfupload.swf",
            upload_url: "php/router.php",
            file_size_limit: "100 MB",
            file_types: "*.*",
            file_types_description: "Image Files",
            file_upload_limit: 100,
            file_queue_limit: 100, 
            debug: false,
            button_placeholder_id: "btnUploadHolder",
            button_cursor: SWFUpload.CURSOR.HAND,
            button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
            file_queued_handler: function(file) {
                Ext.ux.SwfuMgr.fireEvent('filequeued', this, file);
            },
            upload_start_handler: function(file) {
                Ext.ux.SwfuMgr.fireEvent('uploadstart', this, file);
            },
            upload_progress_handler: function(file, complete, total) {
                Ext.ux.SwfuMgr.fireEvent('uploadprogress', this, file, complete, total);
            },
            upload_error_handler: function(file, error, message) {
                Ext.ux.SwfuMgr.fireEvent('uploaderror', this, file, error, message);
            },
            upload_success_handler: function(file, data, response) {
                Ext.ux.SwfuMgr.fireEvent('uploadsuccess', this, file, data);
            },
            minimum_flash_version: "9.0.28",
            post_params: {
                extAction: 'Images', // The class to use
                extUpload: true,      
                extMethod: 'upload'  // The method to execute
                //needs extTID – Transaction ID to associate with this request.
            }
        };
        swfu = new SWFUpload(settings);
    };
    var view, thumbPanel, uploadPanel, tabPanel;
    return {
        debugSWF: false,
        
        init: function() {
            Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
            Ext.QuickTips.init();
            Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';
            Ext.Direct.addProvider(Imgorg.REMOTING_API);
            
            Ext.ux.SwfuMgr.on('filequeued', this.onFileQueued, this);

share/examples/image-organizer/imgorg/App.js  view on Meta::CPAN

                    cmargins: '0 0 0 0',
                    tbar: [{
                        text: 'Add Album',
                        iconCls: 'add',
                        scale: 'large',
                        handler: function() {
                            Ext.getCmp('album-tree').addAlbum();
                        }
                    },{
                        text: 'Upload',
                        iconCls: 'upload',
                        scale: 'large',
                        handler: function() {
                            swfu.selectFiles();
                        }
                    }],
                    listeners: {
                        click: this.onAlbumClick,
                        scope: this
                    }
                },{

share/examples/image-organizer/imgorg/App.js  view on Meta::CPAN

                text: name
            });
            tab.show();
        },
        
        onAlbumClick: function(node, e) {
            this.onOpenAlbum(null, node.attributes.id, node.attributes.text);
        },
        
        onFileQueued: function(swfu, file) {
            if (!uploadPanel) {
                uploadPanel = Ext.getCmp('img-tabpanel').add({
                    title: 'Upload Queue',
                    xtype: 'img-uploadqueue',
                    swfu: swfu
                });
                uploadPanel.show();
                uploadPanel.addFile(swfu, file);
            } else {
                uploadPanel.show();
            }
        },
        
        getSwf: function() {
            return swfu;
        }
    }
}();

Ext.onReady(Imgorg.App.init,Imgorg.App);

share/examples/image-organizer/imgorg/UploadQueue.js  view on Meta::CPAN

requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Imgorg.UploadQueue = Ext.extend(Ext.Panel,{
    swfu: '',
    autoRemove: false,
    uploaded: false,
    
    initComponent: function() {
        Ext.apply(this,{
            layout: 'fit',
            autoScroll: true,
            items: [{
                xtype: 'dataview',
                id: 'img-uploaddv',
                autoWidth: true,
                tpl: new Ext.XTemplate(
                    '<tpl for=".">',
                        '<div class="upload-file" id="{id}">',
                            '<div class="upload-name">{name}</div>',
                            '<div id="{id}-pb" class="upload-pb"></div>',
                            '<div class="x-clear"></div>',
                            '<div class="upload-info">{size:fileSize}</div>',
                        '</div>',
                    '</tpl>'
                ),
                store: new Ext.data.JsonStore({
                    root: '',
                    id: 'id',
                    fields: [
                        {name: 'creationdate', type: 'date'},
                        {name: 'modificationdate', type: 'date'},
                        'filestatus','id','index','name','size','type','dbid'
                    ]
                }),
                itemSelector: 'div.upload-file',
                selectedClass: 'upload-file-selected',
                singleSelect: true
            }],
            tbar:[{
                text: 'Start Upload',
                handler: this.startUpload,
                scope: this,
                iconCls: 'start-upload'
            },{
                text: 'Clear',
                handler: this.cancelUpload,
                scope: this,
                iconCls: 'cancel'
            },'-',{
                text: 'Add to Album',
                handler: this.addAllAlbum,
                scope: this,
                iconCls: 'album-add'

share/examples/image-organizer/imgorg/UploadQueue.js  view on Meta::CPAN

                    },
                    scope: this
                }
            },'Auto-Remove Uploaded']
        });
        Imgorg.UploadQueue.superclass.initComponent.call(this);
        
        this.progressBars = {};
        
        Ext.ux.SwfuMgr.on('filequeued', this.addFile, this);
        Ext.ux.SwfuMgr.on('uploadprogress', this.updateProgress, this);
        Ext.ux.SwfuMgr.on('uploadsuccess', this.uploadSuccess, this);
    },
    
    getDv: function() {
        if (!this.imgUplDv) {
            this.imgUplDv = this.getComponent('img-uploaddv');
        }
        return this.imgUplDv;
    },
    
    startUpload: function() {
        this.swfu.startUpload();
    },
    
    cancelUpload: function() {
        this.swfu.cancelUpload();
        for (var pb in this.progressBars) {
            this.progressBars[pb].destroy();
        }
        this.getDv().store.removeAll();
        this.uploaded = false;
    },
    
    addFile: function(swfu, file) {
        this.getDv().store.loadData([file], true);
    },
    
    addAllAlbum: function(btn) {
        if (!this.uploaded) {
            Ext.Msg.alert('Warning', 'You must upload files before you can add them to an Album');
            return;
        }
        var dv = this.getDv();
        var recs = dv.getRecords(dv.getNodes());
        if (!this.albumWin) {
            this.albumWin = new Imgorg.AlbumWin();
        }
        this.albumWin.selectedRecords = recs;
        this.albumWin.show(btn.btnEl.dom);
    },
    
    tagAll: function(btn) {
        if (!this.uploaded) {
            Ext.Msg.alert('Warning', 'You must upload files before you can Tag them');
            return;
        }
        var dv = this.getDv();
        var recs = dv.getRecords(dv.getNodes());
        Imgorg.TagWin.selectedRecords = recs;
        Imgorg.TagWin.show(btn.btnEl.dom);
    },
    
    updateProgress: function(swfu, file, complete, total) {
        if (this.progressBars[file.id]) {
            this.progressBars[file.id].updateProgress(file.percentUploaded/100,Math.round(file.percentUploaded)+'% Completed... '+Ext.util.Format.fileSize(file.currentSpeed)+'s');
        } else {
            this.progressBars[file.id] = new Ext.ProgressBar({
                text:'0% Completed...',
                renderTo: file.id+'-pb'
            });
        }
    },
    
    uploadSuccess: function(swfu, file, data) {
        var store = this.getDv().store;
        var rec = store.getById(file.id);
        if (this.progressBars[file.id]) {
            this.progressBars[file.id].updateProgress(1, '100% Completed...');
        }
        if (this.autoRemove) {
            store.remove(rec);
        }
        var data = Ext.decode(Ext.util.Format.stripTags(data));
        rec.data.dbid = data.result.res.id;
        this.uploaded = true;
    }
});
Ext.reg('img-uploadqueue', Imgorg.UploadQueue);

Ext.ux.SwfuManager = Ext.extend(Ext.util.Observable, {
    constructor: function(config) {
        Ext.ux.SwfuManager.superclass.constructor.call(this, config);
        this.addEvents(
            'filequeued',
            'uploadstart',
            'uploadprogress',
            'uploaderror',
            'uploadsuccess'
        );
    }
});

Ext.ux.SwfuMgr = new Ext.ux.SwfuManager();

share/examples/image-organizer/index.html  view on Meta::CPAN


 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../ext-all.js"></script>

    <!-- Extra's & Plugins -->
    <script type="text/javascript" src="../ux/DataView-more.js"></script>
    <script type="text/javascript" src="imgorg/MultiCombo.js"></script>
    <script type="text/javascript" src="imgorg/Checkable.js"></script>

    <!-- SWFUpload -->
    <script type="text/javascript" src="SWFUpload/swfupload.js"></script>
    <script type="text/javascript" src="SWFUpload/plugins/swfupload.swfobject.js"></script>
    <script type="text/javascript" src="SWFUpload/plugins/swfupload.queue.js"></script>
    <script type="text/javascript" src="SWFUpload/plugins/swfupload.speed.js"></script>

    <link rel="stylesheet" type="text/css" href="img-org.css" />
    <script type="text/javascript" src="imgorg/App.js"></script>
    <script type="text/javascript" src="imgorg/ImageDv.js"></script>
    <script type="text/javascript" src="imgorg/AlbumTree.js"></script>
    <script type="text/javascript" src="imgorg/ImageThumbPanel.js"></script>
    <script type="text/javascript" src="imgorg/ImagePanel.js"></script>
    <script type="text/javascript" src="imgorg/DirectCombo.js"></script>
    <script type="text/javascript" src="imgorg/AlbumWin.js"></script>
    <script type="text/javascript" src="imgorg/TagWin.js"></script>

share/examples/image-organizer/php/classes/Images.php  view on Meta::CPAN

            array_push($where, ' a.id ="'.$album.'"');
        }
        if ($where) {
            $qry .= ' WHERE'.join(" AND", $where);
        }
        $res = $db->query($qry);
        return $res->fetchAll();
//        return $qry;
    }

    function upload($data, $files){
        $name = $files["Filedata"]["name"];
        $db = new SQLiteDatabase("sql/imgorg.db");
        $db->queryExec('INSERT INTO Images (filename, url) VALUES("'.$name.'","images/'.$name.'")');
        $q = $db->query('SELECT * FROM Images WHERE filename = "'.$name.'"');
        move_uploaded_file($files["Filedata"]["tmp_name"],"../images/".$name);

        return array(
            'data' => $files["Filedata"],
            'res'  => $q->fetchObject()
            //,
            //'test' => $phm->getImageQuality()
            );
    }

    function addToAlbum($data) {

share/examples/image-organizer/php/config.php  view on Meta::CPAN

	        'getAllInfo'=>array(
	            'len'=>1
	        )
        )
    ),
    'Images' => array(
        'methods' => array(
            'load' => array(
                'len' => 1
            ),
            'upload' => array(
                'len' => 1
            ),
            'addToAlbum' => array(
                'len' => 1
            ),
            'tagImage' => array(
                'len' => 1
            ),
            'rename' => array(
                'len' => 1

share/examples/image-organizer/php/router.php  view on Meta::CPAN

$isUpload = false;
if(isset($HTTP_RAW_POST_DATA)){
	header('Content-Type: text/javascript');
	$data = json_decode($HTTP_RAW_POST_DATA);
}else if(isset($_POST['extAction'])){ // form post
	$isForm = true;
	$isUpload = $_POST['extUpload'] == 'true';
	$data = new BogusAction();
	$data->action = $_POST['extAction'];
	$data->method = $_POST['extMethod'];
    $data->tid = isset($_POST['extTID']) ? $_POST['extTID'] : null; // not set for upload
	$data->data = array($_POST, $_FILES);
}else{
	die('Invalid request.');
}

function doRpc($cdata){
    global $API;
	try {
		if(!isset($API[$cdata->action])){
			throw new Exception('Call to undefined action: ' . $cdata->action);

share/examples/ux/fileuploadfield/FileUploadField.js  view on Meta::CPAN

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
Ext.ns('Ext.ux.form');

/**
 * @class Ext.ux.form.FileUploadField
 * @extends Ext.form.TextField
 * Creates a file upload field.
 * @xtype fileuploadfield
 */
Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField,  {
    /**
     * @cfg {String} buttonText The button text to display on the upload button (defaults to
     * 'Browse...').  Note that if you supply a value for {@link #buttonCfg}, the buttonCfg.text
     * value will be used instead if available.
     */
    buttonText: 'Browse...',
    /**
     * @cfg {Boolean} buttonOnly True to display the file upload field as a button with no visible
     * text field (defaults to false).  If true, all inherited TextField members will still be available.
     */
    buttonOnly: false,
    /**
     * @cfg {Number} buttonOffset The number of pixels of space reserved between the button and the text field
     * (defaults to 3).  Note that this only applies if {@link #buttonOnly} = false.
     */
    buttonOffset: 3,
    /**
     * @cfg {Object} buttonCfg A standard {@link Ext.Button} config object.

share/examples/ux/fileuploadfield/FileUploadField.js  view on Meta::CPAN

    // private
    preFocus : Ext.emptyFn,

    // private
    alignErrorIcon : function(){
        this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
    }

});

Ext.reg('fileuploadfield', Ext.ux.form.FileUploadField);

// backwards compat
Ext.form.FileUploadField = Ext.ux.form.FileUploadField;



( run in 3.106 seconds using v1.01-cache-2.11-cpan-364913b4093 )