Created
April 13, 2016 05:06
-
-
Save TheOpenDevProject/c18d68c2d9a1fbb704ed19f53e237a4c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; | |
/******/ | |
/******/ // Create a new module (and put it into the cache) | |
/******/ var module = installedModules[moduleId] = { | |
/******/ exports: {}, | |
/******/ id: moduleId, | |
/******/ loaded: false | |
/******/ }; | |
/******/ | |
/******/ // Execute the module function | |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
/******/ | |
/******/ // Flag the module as loaded | |
/******/ module.loaded = true; | |
/******/ | |
/******/ // Return the exports of the module | |
/******/ return module.exports; | |
/******/ } | |
/******/ | |
/******/ | |
/******/ // expose the modules object (__webpack_modules__) | |
/******/ __webpack_require__.m = modules; | |
/******/ | |
/******/ // expose the module cache | |
/******/ __webpack_require__.c = installedModules; | |
/******/ | |
/******/ // __webpack_public_path__ | |
/******/ __webpack_require__.p = ""; | |
/******/ | |
/******/ // Load entry module and return exports | |
/******/ return __webpack_require__(0); | |
/******/ }) | |
/************************************************************************/ | |
/******/ ([ | |
/* 0 */ | |
/*!************************!*\ | |
!*** ./Users/index.js ***! | |
\************************/ | |
/***/ function(module, exports, __webpack_require__) { | |
"use strict"; | |
var _DPSystemUser = __webpack_require__(/*! ./Models/DPSystemUser */ 1); | |
var DPSystemUser = _interopRequireWildcard(_DPSystemUser); | |
var _KendoGrid = __webpack_require__(/*! ./Classes/KendoGrid.DisplayManager */ 3); | |
var KendoUserGridStatus = _interopRequireWildcard(_KendoGrid); | |
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | |
//Each segment represents a view from ASP.net | |
var UsersModule = { | |
//{{Index.cshtml}} | |
View_ListUsers: $(document).on('ready', function () { | |
var _this = this; | |
/* | |
* @Action = Provides an instance of the KendoUserGridStatus to the kendo grid. | |
*/ | |
var KUGS = new KendoUserGridStatus(); | |
/* | |
* @Bind{#create-user} | |
* @Action = Send the user to the view {{/Users/Create.cshtml}} | |
* | |
*/ | |
if ($('#create-user').length > 0) { | |
$('#create-user').on('click', function () { | |
window.location.href = "" + UrlValues.UsersCreateUser; | |
}); | |
} | |
/* | |
* @Bind{#user-grid .edit-user} | |
* @Action = Send the user to the view {{/Users/Edit.cshtml}}[ID=?] | |
* ES6 Template strings are used to set the query string parameters | |
*/ | |
if ($("#user-grid").length > 0) { | |
$("#user-grid").on("click", ".edit-user", function (event) { | |
window.location.href = UrlValues.UserEdit + "?id=" + $(_this).data('userID'); | |
}); | |
} | |
}), | |
//{{Edit.cshtml}} | |
View_ModifyUsers: $(document).on('ready', function () {}) | |
}; | |
/***/ }, | |
/* 1 */ | |
/*!**************************************!*\ | |
!*** ./Users/Models/DPSystemUser.js ***! | |
\**************************************/ | |
/***/ function(module, exports, __webpack_require__) { | |
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
var _IDataTransport2 = __webpack_require__(/*! ../../Interfaces/IDataTransport */ 2); | |
var _IDataTransport3 = _interopRequireDefault(_IDataTransport2); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | |
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | |
var DPSystemUser = function (_IDataTransport) { | |
_inherits(DPSystemUser, _IDataTransport); | |
function DPSystemUser(_ref) { | |
var ID = _ref.ID; | |
var UserName = _ref.UserName; | |
var FullName = _ref.FullName; | |
var UserStatusID = _ref.UserStatusID; | |
var DefaultDatabaseID = _ref.DefaultDatabaseID; | |
var IsAdmin = _ref.IsAdmin; | |
var ActiveCompanyID = _ref.ActiveCompanyID; | |
var _ref$DPUserCompanySet = _ref.DPUserCompanySettings; | |
var DPUserCompanySettings = _ref$DPUserCompanySet === undefined ? [] : _ref$DPUserCompanySet; | |
_classCallCheck(this, DPSystemUser); | |
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DPSystemUser).call(this)); | |
_this.ID = ID; | |
_this.UserName = UserName; | |
_this.FullName = FullName; | |
_this.UserStatusID = UserStatusID; | |
_this.DefaultDatabaseID = DefaultDatabaseID; | |
_this.IsAdmin = IsAdmin; | |
_this.ActiveCompanyID = ActiveCompanyID; | |
_this.DPUserCompanySettings = DPUserCompanySettings; | |
return _this; | |
} | |
_createClass(DPSystemUser, [{ | |
key: 'toJson', | |
value: function toJson() { | |
return { ID: this.ID, | |
UserName: this.UserName, | |
FullName: this.FullName, | |
UserStatusID: this.UserStatusID, | |
DefaultDatabaseID: this.DefaultDatabaseID, | |
IsAdmin: this.IsAdmin, | |
ActiveCompanyID: this.ActiveCompanyID, | |
DPUserCompanySettings: this.DPUserCompanySettings | |
}; | |
} | |
}, { | |
key: 'fromJson', | |
value: function fromJson(DPUser) { | |
this.ID = DPUser.ID; | |
this.UserName = DPUser.UserName; | |
this.FullName = DPUser.FullName; | |
this.UserStatusID = DPUser.UserStatusID; | |
this.DefaultDatabaseID = DPUser.DefaultDatabaseID; | |
this.IsAdmin = DPUser.IsAdmin; | |
this.ActiveCompanyID = DPUser.ActiveCompanyID; | |
this.DPUserCompanySettings = DPUser.DPUserCompanySettings; | |
} | |
}]); | |
return DPSystemUser; | |
}(_IDataTransport3.default); | |
exports.default = DPSystemUser; | |
/***/ }, | |
/* 2 */ | |
/*!**************************************!*\ | |
!*** ./Interfaces/IDataTransport.js ***! | |
\**************************************/ | |
/***/ function(module, exports) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var IDataTransport = function IDataTransport() { | |
_classCallCheck(this, IDataTransport); | |
if (this.toJson === undefined || typeof this.toJson !== "function") { | |
throw new TypeError("Must implement IDataTransport method toJson"); | |
} | |
if (this.fromJson === undefined || typeof this.fromJson !== "function") { | |
throw new TypeError("Must implement IDataTransport method fromJson"); | |
} | |
}; | |
exports.default = IDataTransport; | |
/***/ }, | |
/* 3 */ | |
/*!***************************************************!*\ | |
!*** ./Users/Classes/KendoGrid.DisplayManager.js ***! | |
\***************************************************/ | |
/***/ function(module, exports) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
//Converts KendoUI statuses to the correct Font Awesome Icon. FA Version 4.4.0 | |
var KendoUserGridStatus = function () { | |
function KendoUserGridStatus() { | |
_classCallCheck(this, KendoUserGridStatus); | |
} | |
_createClass(KendoUserGridStatus, [{ | |
key: "IsAdmin", | |
value: function IsAdmin() { | |
var isAdmin = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; | |
if (isAdmin === true) { | |
return "<i class=\"fa fa-check\"></i>"; | |
} else { | |
return "<i class=\"fa fa-times\"></i>"; | |
} | |
} | |
}, { | |
key: "UserStatus", | |
value: function UserStatus(statusId) { | |
if (statusId === 1) { | |
return "<i class=\"fa fa-check\" aria-hidden=\"true\"></i>"; | |
} else { | |
return "<i class=\"fa fa-times\"></i>"; | |
} | |
} | |
}]); | |
return KendoUserGridStatus; | |
}(); | |
exports.default = KendoUserGridStatus; | |
/***/ } | |
/******/ ]); | |
//# sourceMappingURL=Users.index.js.map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment