Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section>
- <ul class="breadcrumb" role="menu">
- <li><i class="fa fa-home"></i> <a href="#">Home</a><span class="divider"></span></li>
- <li class="active"><i class="fa fa-office"></i> <span>Company</span></li>
- </ul>
- <div class="row">
- <div class="col-lg-12">
- <div data-bind="tabs:{widgetData:widgetData}"></div>
- </div>
- </div>
- </section>
- var vm = {
- activate: activate,
- canDeactivate: canDeactivate,
- dirty: function (root) {
- var _initialized;
- var result = ko.computed(function () {
- if (!_initialized) {
- ko.toJS(root);
- _initialized = true;
- return false;
- }
- return true;
- });
- return result;
- },
- };
- function canDeactivate() {
- if (vm.dirty == true) {
- var app = require('durandal/app');
- return app.showMessage('Are you sure you want to leave this page?', 'Navigate', ['Yes', 'No']);
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement