panel-structure.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. (function (global, factory) {
  2. if (typeof define === "function" && define.amd) {
  3. define("/uikit/panel-structure", ["jquery", "Site"], factory);
  4. } else if (typeof exports !== "undefined") {
  5. factory(require("jquery"), require("Site"));
  6. } else {
  7. var mod = {
  8. exports: {}
  9. };
  10. factory(global.jQuery, global.Site);
  11. global.uikitPanelStructure = mod.exports;
  12. }
  13. })(this, function (_jquery, _Site) {
  14. "use strict";
  15. _jquery = babelHelpers.interopRequireDefault(_jquery);
  16. (0, _jquery.default)(document).ready(function ($$$1) {
  17. (0, _Site.run)();
  18. }); // Example Button Random
  19. // ---------------------
  20. (function () {
  21. (0, _jquery.default)('#exampleButtonRandom').on('click', function (e) {
  22. e.preventDefault();
  23. (0, _jquery.default)('[data-plugin="progress"]').each(function () {
  24. var number = Math.round(Math.random(1) * 100) + '%';
  25. (0, _jquery.default)(this).asProgress('go', number);
  26. });
  27. });
  28. })(); // Example Panel With Tool
  29. // -----------------------
  30. window.customRefreshCallback = function (done) {
  31. var $panel = (0, _jquery.default)(this);
  32. setTimeout(function () {
  33. done();
  34. $panel.find('.panel-body').html('Lorem ipsum In nostrud Excepteur velit reprehenderit quis consequat veniam officia nisi labore in est.');
  35. }, 1000);
  36. }; // Example rating
  37. // ----------------------
  38. // data-plugin="rating" data-half="true" data-number="9" data-score="3" data-hints="bad,,,,regular,,,,gorgeous"
  39. (0, _jquery.default)(".yellow-rating").raty({
  40. targetKeep: true,
  41. half: true,
  42. number: 9,
  43. score: 3,
  44. hints: ["bad", "", "", "", "regular", "", "", "", "gorgeous"],
  45. icon: "font",
  46. starType: "i",
  47. starOff: "icon wb-star",
  48. starOn: "icon wb-star yellow-600",
  49. cancelOff: "icon wb-minus-circle",
  50. cancelOn: "icon wb-minus-circle yellow-600",
  51. starHalf: "icon wb-star-half yellow-500"
  52. });
  53. });