forked from pencilblue/pencilblue
-
Notifications
You must be signed in to change notification settings - Fork 0
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 pencilblue#929 from pencilblue/0.5.0
0.5.0
- Loading branch information
Showing
308 changed files
with
14,638 additions
and
4,692 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,7 @@ | ||
languages: | ||
JavaScript: true | ||
exclude_paths: | ||
- "public/lib/**" | ||
- "public/bower_components/**" | ||
- "public/localization/**" | ||
- "sample.config.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,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.11" | ||
- "0.12" | ||
- "iojs-1.4.2" | ||
- "4.1" | ||
- "iojs-3.3.1" | ||
after_script: | ||
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
- rm -rf ./coverage | ||
- rm -rf ./coverage | ||
sudo: false |
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,74 @@ | ||
/* | ||
Copyright (C) 2015 PencilBlue, LLC | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
module.exports = function BaseAdminControllerModule(pb) { | ||
"use strict"; | ||
|
||
var util = pb.util; | ||
var BaseController = pb.BaseController; | ||
|
||
/** | ||
* This class serves as a base class for all the controllers used in the admin control panel | ||
* @class BaseAdminController | ||
* @constructor | ||
* @extends BaseController | ||
*/ | ||
function BaseAdminController() {} | ||
util.inherits(BaseAdminController, BaseController); | ||
|
||
/** | ||
* Initializes the admin controller with site-related info | ||
* @override | ||
* @method init | ||
* @param {Object} props | ||
* @param {Function} cb | ||
*/ | ||
BaseAdminController.prototype.init = function (props, cb) { | ||
var self = this; | ||
BaseController.prototype.init.call(self, props, function () { | ||
self.extendedInit(cb); | ||
}); | ||
}; | ||
|
||
/** | ||
* Initializes the admin controller with instance variables | ||
* @override | ||
* @method extendedInit | ||
* @param {Function} cb | ||
*/ | ||
BaseAdminController.prototype.extendedInit = function(cb) { | ||
this.siteQueryService = new pb.SiteQueryService({site: this.site, onlyThisSite: true}); | ||
this.settings = pb.SettingServiceFactory.getServiceBySite(this.site, true); | ||
cb(); | ||
}; | ||
|
||
/** | ||
* Centralized place to obtain the pills to be displayed on top of the admin controller | ||
* | ||
* @param navKey | ||
* @param localizationService | ||
* @param activePill | ||
* @param data | ||
* @return {Object} pill objects for admin console with site pill at the beginning | ||
*/ | ||
BaseAdminController.prototype.getAdminPills = function (navKey, localizationService, activePill, data) { | ||
var pills = pb.AdminSubnavService.get(navKey, localizationService, activePill, data); | ||
return pb.AdminSubnavService.addSiteToPills(pills, this.siteName); | ||
}; | ||
|
||
return BaseAdminController; | ||
}; |
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
Oops, something went wrong.