Added BlockUI and Moment.

This commit is contained in:
Sipke Schoorstra 2015-11-21 15:42:03 +01:00
parent 599624c3b0
commit 1271539b0a
33 changed files with 4238 additions and 6546 deletions

View File

@ -10,4 +10,4 @@ Features:
Name: Microsoft Azure Media Services
Description: Provides integration of Microsoft Azure Media Services functionality into Orchard.
Category: Hosting
Dependencies: Orchard.MediaLibrary, Orchard.PublishLater, Orchard.TaskLease
Dependencies: Orchard.MediaLibrary, Orchard.PublishLater, Orchard.TaskLease, Orchard.Resources.jQuery, Orchard.TaskLease, Orchard.Resources.Knockout, Orchard.TaskLease, Orchard.Resources.Moment, Orchard.TaskLease, Orchard.Resources.Underscore, Orchard.Resources.BlockUI

View File

@ -202,7 +202,6 @@
<Content Include="Scripts\cloudmedia-videoplayer-main.min.js" />
<Content Include="Assets\JavaScript\Lib\console-shim.js" />
<Content Include="Assets\JavaScript\Lib\dash.all.js" />
<Content Include="Assets\JavaScript\Lib\jquery.blockui.js" />
<Content Include="Assets\TypeScript\cloudmedia-admin-job.ts" />
<Content Include="Assets\TypeScript\cloudmedia-admin-common.ts" />
<Content Include="Assets\TypeScript\cloudmedia-autorefresh.ts" />
@ -212,11 +211,7 @@
<Content Include="Assets\TypeScript\cloudmedia-edit-cloudvideopart.ts" />
<Content Include="Assets\TypeScript\cloudmedia-edit-cloudvideopart-proxied.ts" />
<Content Include="Assets\TypeScript\cloudmedia-metadata-cloudvideopart.ts" />
<Content Include="Assets\JavaScript\Lib\jquery.fileupload-process.js" />
<Content Include="Assets\JavaScript\Lib\jquery.fileupload-validate.js" />
<Content Include="Assets\JavaScript\Lib\jquery.fileupload.js" />
<Content Include="Assets\JavaScript\Lib\jstree.js" />
<Content Include="Assets\JavaScript\Lib\moment.js" />
<Content Include="Assets\JavaScript\Lib\swfobject.js" />
<Content Include="Assets\JavaScript\Lib\uri.js" />
<Content Include="Assets\JavaScript\Lib\underscore.js" />
@ -226,16 +221,8 @@
<Content Include="Scripts\Lib\dash.all.min.js" />
<Content Include="Scripts\Lib\jquery.blockUI.js" />
<Content Include="Scripts\Lib\jquery.blockUI.min.js" />
<Content Include="Scripts\Lib\jquery.fileupload-process.js" />
<Content Include="Scripts\Lib\jquery.fileupload-process.min.js" />
<Content Include="Scripts\Lib\jquery.fileupload-validate.js" />
<Content Include="Scripts\Lib\jquery.fileupload-validate.min.js" />
<Content Include="Scripts\Lib\jquery.fileupload.js" />
<Content Include="Scripts\Lib\jquery.fileupload.min.js" />
<Content Include="Scripts\Lib\jstree.js" />
<Content Include="Scripts\Lib\jstree.min.js" />
<Content Include="Scripts\Lib\moment.js" />
<Content Include="Scripts\Lib\moment.min.js" />
<Content Include="Scripts\Lib\swfobject.js" />
<Content Include="Scripts\Lib\swfobject.min.js" />
<Content Include="Scripts\Lib\underscore.js" />

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload"],e):e(window.jQuery)}(function(e){"use strict";var s=e.blueimp.fileupload.prototype.options.add;e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{processQueue:[],add:function(r,i){var o=e(this);i.process(function(){return o.fileupload("process",i)}),s.call(this,r,i)}},processActions:{},_processFile:function(s,r){var i=this,o=e.Deferred().resolveWith(i,[s]),t=o.promise();return this._trigger("process",null,s),e.each(s.processQueue,function(s,o){var n=function(s){return r.errorThrown?e.Deferred().rejectWith(i,[r]).promise():i.processActions[o.action].call(i,s,o)};t=t.pipe(n,o.always&&n)}),t.done(function(){i._trigger("processdone",null,s),i._trigger("processalways",null,s)}).fail(function(){i._trigger("processfail",null,s),i._trigger("processalways",null,s)}),t},_transformProcessQueue:function(s){var r=[];e.each(s.processQueue,function(){var i={},o=this.action,t=this.prefix===!0?o:this.prefix;e.each(this,function(r,o){"string"===e.type(o)&&"@"===o.charAt(0)?i[r]=s[o.slice(1)||(t?t+r.charAt(0).toUpperCase()+r.slice(1):r)]:i[r]=o}),r.push(i)}),s.processQueue=r},processing:function(){return this._processing},process:function(s){var r=this,i=e.extend({},this.options,s);return i.processQueue&&i.processQueue.length&&(this._transformProcessQueue(i),0===this._processing&&this._trigger("processstart"),e.each(s.files,function(o){var t=o?e.extend({},i):i,n=function(){return s.errorThrown?e.Deferred().rejectWith(r,[s]).promise():r._processFile(t,s)};t.index=o,r._processing+=1,r._processingQueue=r._processingQueue.pipe(n,n).always(function(){r._processing-=1,0===r._processing&&r._trigger("processstop")})})),this._processingQueue},_create:function(){this._super(),this._processing=0,this._processingQueue=e.Deferred().resolveWith(this).promise()}})});

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],e):e(window.jQuery)}(function(e){"use strict";e.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{getNumberOfFiles:e.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(i,l){if(l.disabled)return i;var r,s=e.Deferred(),t=this.options,o=i.files[i.index];return(l.minFileSize||l.maxFileSize)&&(r=o.size),"number"===e.type(l.maxNumberOfFiles)&&(t.getNumberOfFiles()||0)+i.files.length>l.maxNumberOfFiles?o.error=t.i18n("maxNumberOfFiles"):!l.acceptFileTypes||l.acceptFileTypes.test(o.type)||l.acceptFileTypes.test(o.name)?r>l.maxFileSize?o.error=t.i18n("maxFileSize"):"number"===e.type(r)&&r<l.minFileSize?o.error=t.i18n("minFileSize"):delete o.error:o.error=t.i18n("acceptFileTypes"),o.error||i.files.error?(i.files.error=!0,s.rejectWith(this,[i])):s.resolveWith(this,[i]),s.promise()}}})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
@model CloudVideoPartViewModel
@{
Script.Include("Lib/moment.js", "Lib/moment.min.js").AtFoot();
Script.Require("Moment").AtFoot();
Script.Include("cloudmedia-edit-cloudvideopart-direct.js", "cloudmedia-edit-cloudvideopart-direct.min.js").AtFoot();
var isCreatingItem = Model.Id == 0;
}

View File

@ -10,8 +10,8 @@
Script.Include("Lib/swfobject.js", "Lib/swfobject.min.js").AtFoot();
Script.Include("Lib/dash.all.js", "Lib/dash.all.min.js").AtFoot();
Script.Include("Lib/uri.js", "Lib/uri.min.js").AtFoot();
Script.Include("Lib/underscore.js", "Lib/underscore.min.js").AtFoot();
Script.Include("Lib/moment.js", "Lib/moment.min.js").AtFoot();
Script.Require("Underscore").AtFoot();
Script.Require("Moment").AtFoot();
Script.Include("Lib/console-shim.js", "Lib/console-shim.min.js").AtFoot();
Script.Include("cloudmedia-videoplayer-data.js", "cloudmedia-videoplayer-data.min.js").AtFoot();
Script.Include("cloudmedia-videoplayer-injectors.js", "cloudmedia-videoplayer-injectors.min.js").AtFoot();

View File

@ -16,10 +16,8 @@
Script.Require("jQueryUI");
Script.Require("jQueryUI_Tabs");
Script.Require("ShapesBase");
Script.Include("Lib/jquery.blockui.js", "Lib/jquery.blockui.min.js");
Script.Include("Lib/jquery.fileupload.js", "Lib/jquery.fileupload.min.js");
Script.Include("Lib/jquery.fileupload-process.js", "Lib/jquery.fileupload-process.min.js");
Script.Include("Lib/jquery.fileupload-validate.js", "Lib/jquery.fileupload-validate.min.js");
Script.Require("BlockUI");
Script.Require("jQueryFileUpload");
Script.Include("cloudmedia-autorefresh.js", "cloudmedia-autorefresh.min.js");
Script.Include("cloudmedia-edit-cloudvideopart.js", "cloudmedia-edit-cloudvideopart.min.js");
}

View File

@ -9,7 +9,7 @@
Script.Require("JQuery").AtFoot();
Script.Require("jQueryUI").AtFoot();
Script.Require("jQueryUI_Tabs").AtFoot();
Script.Include("~/Modules/Orchard.MediaLibrary/Scripts/knockout-2.3.0.js").AtFoot();
Script.Require("Knockout").AtFoot();
Script.Include("cloudmedia-admin-settings.js", "cloudmedia-admin-settings.min.js").AtFoot();
Layout.Title = T("Microsoft Azure Media Settings");

View File

@ -182,8 +182,10 @@
},
{
"inputs": [
"Assets/Js/jQuery/jquery.iframe-transport.js",
"Assets/Js/jQuery/jquery.fileupload.js"
"Assets/Js/FileUpload/jquery.iframe-transport.js",
"Assets/Js/FileUpload/jquery.fileupload.js",
"Assets/Js/FileUpload/jquery.fileupload-process.js",
"Assets/Js/FileUpload/jquery.fileupload-validate.js"
],
"output": "Scripts/jquery.fileupload-full.js"
},
@ -273,5 +275,13 @@
{
"inputs": [ "Assets/Js/Knockout/knockout-3.4.0.js" ],
"output": "Scripts/knockout.js"
},
{
"inputs": [ "Assets/Js/Moment/moment.js" ],
"output": "Scripts/moment.js"
},
{
"inputs": [ "Assets/Js/BlockUI/jquery.blockui.js" ],
"output": "Scripts/jquery.blockui.js"
}
]

View File

@ -1,6 +1,6 @@
/*!
* jQuery blockUI plugin
* Version 2.66.0-2013.10.09
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
@ -107,7 +107,7 @@
});
};
$.blockUI.version = 2.66; // 2nd generation blocking at no extra cost!
$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
@ -232,7 +232,7 @@
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
onOverlayClick: null,
// don't ask; if you really must know: http://groups.google.com/requiredUploads/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
quirksmodeOffsetHack: 4,
// class name of the message block
@ -426,7 +426,7 @@
if (msg)
lyr3.show();
if (opts.onBlock)
opts.onBlock();
opts.onBlock.bind(lyr3)();
}
// bind key and mouse events
@ -515,6 +515,7 @@
if (data && data.el) {
data.el.style.display = data.display;
data.el.style.position = data.position;
data.el.style.cursor = 'default'; // #59
if (data.parent)
data.parent.appendChild(data.el);
$el.removeData('blockUI.history');

View File

@ -0,0 +1,12 @@
using Orchard.Environment.Extensions;
using Orchard.UI.Resources;
namespace Orchard.Resources {
[OrchardFeature("Orchard.Resources.BlockUI")]
public class BlockUI : IResourceManifestProvider {
public void BuildManifests(ResourceManifestBuilder builder) {
var manifest = builder.Add();
manifest.DefineScript("BlockUI").SetUrl("jquery.blockui.min.js", "jquery.blockui.js").SetVersion("2.70.0").SetDependencies("jQuery");
}
}
}

View File

@ -44,4 +44,14 @@ Features:
Name: Knockout Resources
Description: Provides the Knockout script library.
Category: Core
Dependencies: Orchard.Resources
Dependencies: Orchard.Resources
Orchard.Resources.Moment:
Name: Moment Resources
Description: Provides the Moment script library.
Category: Core
Dependencies: Orchard.Resources
Orchard.Resources.BlockUI:
Name: Moment Resources
Description: Provides the BlockUI script library.
Category: Core
Dependencies: Orchard.Resources, Orchard.Resources.jQuery

View File

@ -0,0 +1,12 @@
using Orchard.Environment.Extensions;
using Orchard.UI.Resources;
namespace Orchard.Resources {
[OrchardFeature("Orchard.Resources.Moment")]
public class Moment : IResourceManifestProvider {
public void BuildManifests(ResourceManifestBuilder builder) {
var manifest = builder.Add();
manifest.DefineScript("Moment").SetUrl("moment.min.js", "moment.js").SetVersion("2.10.6");
}
}
}

View File

@ -81,6 +81,7 @@
<Content Include="Assets\Js\Angular\angular-sanitize.js" />
<Content Include="Assets\Js\Angular\angular.js" />
<Content Include="Assets\Js\Angular\sortable.js" />
<Content Include="Assets\Js\BlockUI\jquery.blockui.js" />
<Content Include="Assets\Js\Bootstrap\affix.js" />
<Content Include="Assets\Js\Bootstrap\alert.js" />
<Content Include="Assets\Js\Bootstrap\button.js" />
@ -309,6 +310,9 @@
<Content Include="Assets\Js\Colorbox\i18n\jquery.colorbox-zh-CN.js" />
<Content Include="Assets\Js\Colorbox\i18n\jquery.colorbox-zh-TW.js" />
<Content Include="Assets\Js\Colorbox\jquery.colorbox.js" />
<Content Include="Assets\Js\FileUpload\jquery.fileupload-process.js" />
<Content Include="Assets\Js\FileUpload\jquery.fileupload-validate.js" />
<Content Include="Assets\Js\FileUpload\jquery.fileupload.js" />
<Content Include="Assets\Js\History\history.js" />
<Content Include="Assets\Js\jQueryUI\data.js" />
<Content Include="Assets\Js\jQueryUI\effect.js" />
@ -438,11 +442,11 @@
<Content Include="Assets\Js\jQueryUI\widgets\tooltip.js" />
<Content Include="Assets\Js\jQuery\jquery-2.1.4.js" />
<Content Include="Assets\Js\jQuery\jquery.cookie.js" />
<Content Include="Assets\Js\jQuery\jquery.fileupload.js" />
<Content Include="Assets\Js\jQuery\jquery.iframe-transport.js" />
<Content Include="Assets\Js\FileUpload\jquery.iframe-transport.js" />
<Content Include="Assets\Js\jQuery\jquery.plugin.js" />
<Content Include="Assets\Js\jQuery\jquery.utils.js" />
<Content Include="Assets\Js\Knockout\knockout-3.4.0.js" />
<Content Include="Assets\Js\Moment\moment.js" />
<Content Include="Assets\Js\TimeEntry\jquery.timeentry-ar.js" />
<Content Include="Assets\Js\TimeEntry\jquery.timeentry-ca.js" />
<Content Include="Assets\Js\TimeEntry\jquery.timeentry-cs.js" />
@ -489,6 +493,8 @@
<Content Include="Scripts\jquery-ui-widgets.min.js" />
<Content Include="Scripts\jquery-ui.js" />
<Content Include="Scripts\jquery-ui.min.js" />
<Content Include="Scripts\jquery.blockui.js" />
<Content Include="Scripts\jquery.blockui.min.js" />
<Content Include="Scripts\jquery.calendars.picker.full.js" />
<Content Include="Scripts\jquery.calendars.picker.full.min.js" />
<Content Include="Scripts\jquery.colorbox.js" />
@ -509,6 +515,8 @@
<Content Include="Scripts\jquery.utils.min.js" />
<Content Include="Scripts\knockout.js" />
<Content Include="Scripts\knockout.min.js" />
<Content Include="Scripts\moment.js" />
<Content Include="Scripts\moment.min.js" />
<Content Include="Scripts\ui\accordion.js" />
<Content Include="Scripts\ui\accordion.min.js" />
<Content Include="Scripts\ui\autocomplete.js" />
@ -611,6 +619,8 @@
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<Compile Include="BlockUI.cs" />
<Compile Include="Moment.cs" />
<Compile Include="Knockout.cs" />
<Compile Include="History.cs" />
<Compile Include="FontAwesome.cs" />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long