Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. function CAboutViewModel()
  2. {
  3. this.count = ko.observable(0);
  4.  
  5. this.version = ko.observable('');
  6. this.version.loading = ko.observable(false);
  7. }
  8.  
  9. CAboutViewModel.prototype.TemplateName = 'Plugin_AboutTemplate';
  10. CAboutViewModel.prototype.TabName = 'about';
  11. CAboutViewModel.prototype.TabTitle = AfterLogicApi.i18n('PLUGIN_ABOUT/TAB_NAME');
  12.  
  13. CAboutViewModel.prototype.clickSampleButtom = function ()
  14. {
  15. this.count(this.count() + 1);
  16. };
  17.  
  18. CAboutViewModel.prototype.getAjaxData = function ()
  19. {
  20. if (!this.version.loading())
  21. {
  22. this.version.loading(true);
  23.  
  24. AfterLogicApi.sendAjaxRequest({
  25. 'Action': 'PluginGetAjaxData'
  26. }, function (oData) {
  27. this.version.loading(false);
  28. if (oData && oData['Data'])
  29. {
  30. this.version(oData['Data']);
  31. }
  32. }, this);
  33. }
  34. };
  35.  
  36. AfterLogicApi.addSettingsTab(CAboutViewModel);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement