-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nteske/main
MCM playlist plugin Fixed
- Loading branch information
Showing
151 changed files
with
24,276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
control/content/assets/js/*.js | ||
control/design/assets/js/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- "4.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# pluginMediaCenterManualEntries ![](https://api.travis-ci.org/BuildFire/pluginMediaCenterManualEntries.svg) | ||
BuildFire Plugin: media center with manual entries | ||
|
||
##How to run and test | ||
###Prerequisite are node.js,bower,npm,karma, karma-coverage | ||
```bash | ||
$ npm install -g karma-cli | ||
$ npm install -g karma-coverage | ||
$ npm install -g bower | ||
``` | ||
###Install bower and node dependencies | ||
```bash | ||
$ bower install | ||
$ npm install | ||
``` | ||
###Run the test cases | ||
```bash | ||
$ npm test | ||
Or | ||
$ karma start --reporters progress | ||
``` | ||
###Run the test cases to see coverage | ||
```bash | ||
$ karma start | ||
``` | ||
|
||
##How to validate js via eslint | ||
###Prerequisite are node.js,bower,npm,karma, karma-coverage | ||
```bash | ||
$ npm install -g gulp | ||
``` | ||
|
||
###Installnode dependencies | ||
```bash | ||
$ npm install | ||
``` | ||
###Run the validate | ||
```bash | ||
$ gulp validate | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "media-center-plugin", | ||
"version": "0.0.0", | ||
"authors": [ | ||
"deepakshrma <[email protected]>", | ||
"vineetasharma <[email protected]>" | ||
], | ||
"description": "\"media-center-plugin\"", | ||
"moduleType": [ | ||
"node" | ||
], | ||
"keywords": [ | ||
"media-center-plugin", | ||
"testing", | ||
"buildfire", | ||
"karma", | ||
"jasmine\"" | ||
], | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"devDependencies": { | ||
"angular": "~1.4.2", | ||
"angular-mocks": "~1.4.2", | ||
"jquery": "~2.1.4", | ||
"angular-bootstrap": "~0.13.3", | ||
"angular-route": "~1.4.0", | ||
"angular-animate": "~1.4.3", | ||
"angular-ui-tinymce": "~0.0.9" | ||
}, | ||
"resolutions": { | ||
"angular": "~1.x" | ||
}, | ||
"dependencies": { | ||
"videogular-controls": "~1.2.6", | ||
"videogular-overlay-play": "~1.2.6", | ||
"ng-videosharing-embed": "~0.3.3", | ||
"ngSanitize": "~0.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
(function (angular, buildfire) { | ||
"use strict"; | ||
//created mediaCenterContent module | ||
angular | ||
.module('mediaCenterContent', | ||
[ | ||
'mediaCenterEnums', | ||
'mediaCenterContentServices', | ||
'mediaCenterControlFilters', | ||
'mediaCenterModals', | ||
'ngAnimate', | ||
'ngRoute', | ||
'ui.bootstrap', | ||
'ui.sortable', | ||
'ngClipboard', | ||
'infinite-scroll', | ||
'bngCsv', | ||
'ui.tinymce' | ||
|
||
]) | ||
//injected ngRoute for routing | ||
//injected ui.bootstrap for angular bootstrap component | ||
//injected ui.sortable for manual ordering of list | ||
//ngClipboard to provide copytoclipboard feature | ||
.config(['$routeProvider', 'ngClipProvider', '$httpProvider', function ($routeProvider, ngClipProvider, $httpProvider) { | ||
ngClipProvider.setPath("//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.1.6/ZeroClipboard.swf"); | ||
$routeProvider | ||
.when('/', { | ||
templateUrl: 'templates/home.html', | ||
controllerAs: 'ContentHome', | ||
controller: 'ContentHomeCtrl', | ||
resolve: { | ||
MediaCenterInfo: ['$q', 'DB', 'COLLECTIONS', 'Orders', 'Location', function ($q, DB, COLLECTIONS, Orders, Location) { | ||
var deferred = $q.defer(); | ||
var MediaCenter = new DB(COLLECTIONS.MediaCenter); | ||
MediaCenter.get().then(function success(result) { | ||
if (result && result.id && result.data) { | ||
deferred.resolve(result); | ||
} | ||
else { | ||
deferred.resolve(null); | ||
} | ||
}, | ||
function fail(err) { | ||
deferred.resolve(null); | ||
} | ||
); | ||
return deferred.promise; | ||
}] | ||
} | ||
}) | ||
// .when('/media', { | ||
// templateUrl: 'templates/media.html', | ||
// controllerAs: 'ContentMedia', | ||
// controller: 'ContentMediaCtrl', | ||
// resolve: { | ||
// media: function () { | ||
// return null; | ||
// } | ||
// } | ||
// }) | ||
// .when('/media/:itemId', { | ||
// templateUrl: 'templates/media.html', | ||
// controllerAs: 'ContentMedia', | ||
// controller: 'ContentMediaCtrl', | ||
// resolve: { | ||
// media: ['$q', 'DB', 'COLLECTIONS', 'Orders', 'Location', '$route', function ($q, DB, COLLECTIONS, Orders, Location, $route) { | ||
// var deferred = $q.defer(); | ||
// var MediaContent = new DB(COLLECTIONS.MediaContent); | ||
// if ($route.current.params.itemId) { | ||
// MediaContent.getById($route.current.params.itemId).then(function success(result) { | ||
// if (result && result.data) { | ||
// deferred.resolve(result); | ||
// } | ||
// else { | ||
// Location.goToHome(); | ||
// } | ||
// }, | ||
// function fail() { | ||
// Location.goToHome(); | ||
// } | ||
// ); | ||
// } | ||
// else { | ||
// Location.goToHome(); | ||
// } | ||
// return deferred.promise; | ||
// }] | ||
// } | ||
// }) | ||
.otherwise('/'); | ||
var interceptor = ['$q', function ($q) { | ||
var counter = 0; | ||
|
||
return { | ||
|
||
request: function (config) { | ||
buildfire.spinner.show(); | ||
//NProgress.start(); | ||
|
||
counter++; | ||
return config; | ||
}, | ||
response: function (response) { | ||
counter--; | ||
if (counter === 0) { | ||
|
||
buildfire.spinner.hide(); | ||
} | ||
return response; | ||
}, | ||
responseError: function (rejection) { | ||
counter--; | ||
if (counter === 0) { | ||
|
||
buildfire.spinner.hide(); | ||
} | ||
|
||
return $q.reject(rejection); | ||
} | ||
}; | ||
}]; | ||
|
||
$httpProvider.interceptors.push(interceptor); | ||
|
||
}]) | ||
.run(['Location', 'Messaging', 'EVENTS', 'PATHS', 'Buildfire', function (Location, Messaging, EVENTS, PATHS, Buildfire) { | ||
// Handler to receive message from widget | ||
Messaging.onReceivedMessage = function (event) { | ||
if (event) { | ||
switch (event.name) { | ||
case EVENTS.ROUTE_CHANGE: | ||
var path = event.message.path, | ||
id = event.message.id; | ||
var url = "#/"; | ||
switch (path) { | ||
case PATHS.MEDIA: | ||
url = url + "media"; | ||
if (id) { | ||
url = url + "/" + id; | ||
} | ||
break; | ||
case PATHS.HOME: | ||
//Buildfire.history.pop(); | ||
url = url + "home"; | ||
break; | ||
default : | ||
break | ||
} | ||
Location.go(url); | ||
break; | ||
} | ||
} | ||
}; | ||
/*Buildfire.history.onPop(function(data,err){ | ||
if(data && data.label!='Media') | ||
Location.goToHome(); | ||
console.log('Buildfire.history.onPop called--------------------------------------------',data,err); | ||
});*/ | ||
}]); | ||
}) | ||
(window.angular, window.buildfire); |
Oops, something went wrong.