Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <section>
  2. <ul class="breadcrumb" role="menu">
  3. <li><i class="fa fa-home"></i> <a href="#">Home</a><span class="divider"></span></li>
  4. <li class="active"><i class="fa fa-office"></i> <span>Company</span></li>
  5. </ul>
  6. <div class="row">
  7. <div class="col-lg-12">
  8. <div data-bind="tabs:{widgetData:widgetData}"></div>
  9. </div>
  10. </div>
  11. </section>
  12.  
  13. var vm = {
  14. activate: activate,
  15. canDeactivate: canDeactivate,
  16. dirty: function (root) {
  17. var _initialized;
  18. var result = ko.computed(function () {
  19. if (!_initialized) {
  20. ko.toJS(root);
  21. _initialized = true;
  22. return false;
  23. }
  24. return true;
  25. });
  26.  
  27. return result;
  28. },
  29. };
  30.  
  31. function canDeactivate() {
  32. if (vm.dirty == true) {
  33. var app = require('durandal/app');
  34. return app.showMessage('Are you sure you want to leave this page?', 'Navigate', ['Yes', 'No']);
  35. } else {
  36. return true;
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement