main.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. function BxDevMain(oOptions) {
  2. this._sSystem = oOptions.sSystem;
  3. this._sActionsUrl = oOptions.sActionUrl;
  4. this._sObjName = oOptions.sObjName == undefined ? 'oDevMain' : oOptions.sObjName;
  5. this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
  6. this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
  7. }
  8. BxDevMain.prototype.pgtRecompile = function(sLanguage) {
  9. var $this = this;
  10. var oDate = new Date();
  11. var oParams = {
  12. _t:oDate.getTime()
  13. };
  14. if(sTypeParams)
  15. oParams['params'] = sTypeParams;
  16. if($('#articles-filter-chb:checked').length > 0 && $('#articles-filter-txt').val().length > 0)
  17. oParams['filter_value'] = $('#articles-filter-txt').val();
  18. var sLoadingId = '#articles-' + sType + '-loading';
  19. $(sLoadingId).bx_loading();
  20. $.post(
  21. this._sActionsUrl + 'act_get_articles/' + (sType ? sType + '/' : '') + iStart + '/' + iPerPage + '/',
  22. oParams,
  23. function(sData) {
  24. $(sLoadingId).bx_loading();
  25. $('.arl-view #arl-content-' + sType).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
  26. $(this).replaceWith(sData);
  27. });
  28. },
  29. 'html'
  30. );
  31. };