You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

876 lines
26 KiB

9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
  1. /*!
  2. * # Semantic UI 2.0.0 - Modal
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. ;(function ( $, window, document, undefined ) {
  12. "use strict";
  13. $.fn.modal = function(parameters) {
  14. var
  15. $allModules = $(this),
  16. $window = $(window),
  17. $document = $(document),
  18. $body = $('body'),
  19. moduleSelector = $allModules.selector || '',
  20. time = new Date().getTime(),
  21. performance = [],
  22. query = arguments[0],
  23. methodInvoked = (typeof query == 'string'),
  24. queryArguments = [].slice.call(arguments, 1),
  25. requestAnimationFrame = window.requestAnimationFrame
  26. || window.mozRequestAnimationFrame
  27. || window.webkitRequestAnimationFrame
  28. || window.msRequestAnimationFrame
  29. || function(callback) { setTimeout(callback, 0); },
  30. returnedValue
  31. ;
  32. $allModules
  33. .each(function() {
  34. var
  35. settings = ( $.isPlainObject(parameters) )
  36. ? $.extend(true, {}, $.fn.modal.settings, parameters)
  37. : $.extend({}, $.fn.modal.settings),
  38. selector = settings.selector,
  39. className = settings.className,
  40. namespace = settings.namespace,
  41. error = settings.error,
  42. eventNamespace = '.' + namespace,
  43. moduleNamespace = 'module-' + namespace,
  44. $module = $(this),
  45. $context = $(settings.context),
  46. $close = $module.find(selector.close),
  47. $allModals,
  48. $otherModals,
  49. $focusedElement,
  50. $dimmable,
  51. $dimmer,
  52. element = this,
  53. instance = $module.data(moduleNamespace),
  54. elementNamespace,
  55. id,
  56. observer,
  57. module
  58. ;
  59. module = {
  60. initialize: function() {
  61. module.verbose('Initializing dimmer', $context);
  62. module.create.id();
  63. module.create.dimmer();
  64. module.refreshModals();
  65. module.bind.events();
  66. module.observeChanges();
  67. module.instantiate();
  68. },
  69. instantiate: function() {
  70. module.verbose('Storing instance of modal');
  71. instance = module;
  72. $module
  73. .data(moduleNamespace, instance)
  74. ;
  75. },
  76. create: {
  77. dimmer: function() {
  78. var
  79. defaultSettings = {
  80. debug : settings.debug,
  81. dimmerName : 'modals',
  82. duration : {
  83. show : settings.duration,
  84. hide : settings.duration
  85. }
  86. },
  87. dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
  88. ;
  89. if($.fn.dimmer === undefined) {
  90. module.error(error.dimmer);
  91. return;
  92. }
  93. module.debug('Creating dimmer with settings', dimmerSettings);
  94. $dimmable = $context.dimmer(dimmerSettings);
  95. if(settings.detachable) {
  96. module.verbose('Modal is detachable, moving content into dimmer');
  97. $dimmable.dimmer('add content', $module);
  98. }
  99. else {
  100. module.set.undetached();
  101. }
  102. $dimmer = $dimmable.dimmer('get dimmer');
  103. },
  104. id: function() {
  105. id = (Math.random().toString(16) + '000000000').substr(2,8);
  106. elementNamespace = '.' + id;
  107. module.verbose('Creating unique id for element', id);
  108. }
  109. },
  110. destroy: function() {
  111. module.verbose('Destroying previous modal');
  112. $module
  113. .removeData(moduleNamespace)
  114. .off(eventNamespace)
  115. ;
  116. $window.off(elementNamespace);
  117. $close.off(eventNamespace);
  118. $context.dimmer('destroy');
  119. },
  120. observeChanges: function() {
  121. if('MutationObserver' in window) {
  122. observer = new MutationObserver(function(mutations) {
  123. module.debug('DOM tree modified, refreshing');
  124. module.refresh();
  125. });
  126. observer.observe(element, {
  127. childList : true,
  128. subtree : true
  129. });
  130. module.debug('Setting up mutation observer', observer);
  131. }
  132. },
  133. refresh: function() {
  134. module.remove.scrolling();
  135. module.cacheSizes();
  136. module.set.screenHeight();
  137. module.set.type();
  138. module.set.position();
  139. },
  140. refreshModals: function() {
  141. $otherModals = $module.siblings(selector.modal);
  142. $allModals = $otherModals.add($module);
  143. },
  144. attachEvents: function(selector, event) {
  145. var
  146. $toggle = $(selector)
  147. ;
  148. event = $.isFunction(module[event])
  149. ? module[event]
  150. : module.toggle
  151. ;
  152. if($toggle.length > 0) {
  153. module.debug('Attaching modal events to element', selector, event);
  154. $toggle
  155. .off(eventNamespace)
  156. .on('click' + eventNamespace, event)
  157. ;
  158. }
  159. else {
  160. module.error(error.notFound, selector);
  161. }
  162. },
  163. bind: {
  164. events: function() {
  165. module.verbose('Attaching events');
  166. $module
  167. .on('click' + eventNamespace, selector.close, module.event.close)
  168. ;
  169. $window
  170. .on('resize' + elementNamespace, module.event.resize)
  171. ;
  172. }
  173. },
  174. get: {
  175. id: function() {
  176. return (Math.random().toString(16) + '000000000').substr(2,8);
  177. }
  178. },
  179. event: {
  180. close: function() {
  181. module.verbose('Closing element pressed');
  182. if( $(this).is(selector.approve) ) {
  183. if(settings.onApprove.call(element) !== false) {
  184. module.hide();
  185. }
  186. else {
  187. module.verbose('Approve callback returned false cancelling hide');
  188. }
  189. }
  190. else if( $(this).is(selector.deny) ) {
  191. if(settings.onDeny.call(element) !== false) {
  192. module.hide();
  193. }
  194. else {
  195. module.verbose('Deny callback returned false cancelling hide');
  196. }
  197. }
  198. else {
  199. module.hide();
  200. }
  201. },
  202. click: function(event) {
  203. var
  204. $target = $(event.target),
  205. isInModal = ($target.closest($module).length > 0),
  206. isInDOM = $.contains(document.documentElement, event.target)
  207. ;
  208. if(!isInModal && isInDOM) {
  209. module.debug('Dimmer clicked, hiding all modals');
  210. if( module.is.active() ) {
  211. module.remove.clickaway();
  212. if(settings.allowMultiple) {
  213. module.hide();
  214. }
  215. else {
  216. module.hideAll();
  217. }
  218. }
  219. }
  220. },
  221. debounce: function(method, delay) {
  222. clearTimeout(module.timer);
  223. module.timer = setTimeout(method, delay);
  224. },
  225. keyboard: function(event) {
  226. var
  227. keyCode = event.which,
  228. escapeKey = 27
  229. ;
  230. if(keyCode == escapeKey) {
  231. if(settings.closable) {
  232. module.debug('Escape key pressed hiding modal');
  233. module.hide();
  234. }
  235. else {
  236. module.debug('Escape key pressed, but closable is set to false');
  237. }
  238. event.preventDefault();
  239. }
  240. },
  241. resize: function() {
  242. if( $dimmable.dimmer('is active') ) {
  243. requestAnimationFrame(module.refresh);
  244. }
  245. }
  246. },
  247. toggle: function() {
  248. if( module.is.active() || module.is.animating() ) {
  249. module.hide();
  250. }
  251. else {
  252. module.show();
  253. }
  254. },
  255. show: function(callback) {
  256. callback = $.isFunction(callback)
  257. ? callback
  258. : function(){}
  259. ;
  260. module.refreshModals();
  261. module.showModal(callback);
  262. },
  263. hide: function(callback) {
  264. callback = $.isFunction(callback)
  265. ? callback
  266. : function(){}
  267. ;
  268. module.refreshModals();
  269. module.hideModal(callback);
  270. },
  271. showModal: function(callback) {
  272. callback = $.isFunction(callback)
  273. ? callback
  274. : function(){}
  275. ;
  276. if( module.is.animating() || !module.is.active() ) {
  277. module.showDimmer();
  278. module.cacheSizes();
  279. module.set.position();
  280. module.set.screenHeight();
  281. module.set.type();
  282. module.set.clickaway();
  283. if( !settings.allowMultiple && $otherModals.filter('.' + className.active).length > 0) {
  284. module.debug('Other modals visible, queueing show animation');
  285. module.hideOthers(module.showModal);
  286. }
  287. else {
  288. settings.onShow.call(element);
  289. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  290. module.debug('Showing modal with css animations');
  291. $module
  292. .transition({
  293. debug : settings.debug,
  294. animation : settings.transition + ' in',
  295. queue : settings.queue,
  296. duration : settings.duration,
  297. useFailSafe : true,
  298. onComplete : function() {
  299. settings.onVisible.apply(element);
  300. module.add.keyboardShortcuts();
  301. module.save.focus();
  302. module.set.active();
  303. module.set.autofocus();
  304. callback();
  305. }
  306. })
  307. ;
  308. }
  309. else {
  310. module.debug('Showing modal with javascript');
  311. $module
  312. .fadeIn(settings.duration, settings.easing, function() {
  313. settings.onVisible.apply(element);
  314. module.add.keyboardShortcuts();
  315. module.save.focus();
  316. module.set.active();
  317. callback();
  318. })
  319. ;
  320. }
  321. }
  322. }
  323. else {
  324. module.debug('Modal is already visible');
  325. }
  326. },
  327. hideModal: function(callback, keepDimmed) {
  328. callback = $.isFunction(callback)
  329. ? callback
  330. : function(){}
  331. ;
  332. module.debug('Hiding modal');
  333. settings.onHide.call(element);
  334. if( module.is.animating() || module.is.active() ) {
  335. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  336. module.remove.active();
  337. $module
  338. .transition({
  339. debug : settings.debug,
  340. animation : settings.transition + ' out',
  341. queue : settings.queue,
  342. duration : settings.duration,
  343. useFailSafe : true,
  344. onStart : function() {
  345. if(!module.othersActive() && !keepDimmed) {
  346. module.hideDimmer();
  347. }
  348. module.remove.keyboardShortcuts();
  349. },
  350. onComplete : function() {
  351. settings.onHidden.call(element);
  352. module.restore.focus();
  353. callback();
  354. }
  355. })
  356. ;
  357. }
  358. else {
  359. module.remove.active();
  360. if( !module.othersActive() ) {
  361. module.hideDimmer();
  362. }
  363. module.remove.keyboardShortcuts();
  364. $module
  365. .fadeOut(settings.duration, settings.easing, function() {
  366. settings.onHidden.call(element);
  367. module.restore.focus();
  368. callback();
  369. })
  370. ;
  371. }
  372. }
  373. },
  374. showDimmer: function() {
  375. if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {
  376. module.debug('Showing dimmer');
  377. $dimmable.dimmer('show');
  378. }
  379. else {
  380. module.debug('Dimmer already visible');
  381. }
  382. },
  383. hideDimmer: function() {
  384. if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
  385. $dimmable.dimmer('hide', function() {
  386. if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
  387. module.remove.clickaway();
  388. module.remove.screenHeight();
  389. }
  390. });
  391. }
  392. else {
  393. module.debug('Dimmer is not visible cannot hide');
  394. return;
  395. }
  396. },
  397. hideAll: function(callback) {
  398. var
  399. $visibleModals = $allModals.filter(':visible')
  400. ;
  401. callback = $.isFunction(callback)
  402. ? callback
  403. : function(){}
  404. ;
  405. if( $visibleModals.length > 0 ) {
  406. module.debug('Hiding all visible modals');
  407. module.hideDimmer();
  408. $visibleModals
  409. .modal('hide modal', callback)
  410. ;
  411. }
  412. },
  413. hideOthers: function(callback) {
  414. var
  415. $visibleModals = $otherModals.filter(':visible')
  416. ;
  417. callback = $.isFunction(callback)
  418. ? callback
  419. : function(){}
  420. ;
  421. if( $visibleModals.length > 0 ) {
  422. module.debug('Hiding other modals', $otherModals);
  423. $visibleModals
  424. .modal('hide modal', callback, true)
  425. ;
  426. }
  427. },
  428. othersActive: function() {
  429. return ($otherModals.filter('.' + className.active).length > 0);
  430. },
  431. add: {
  432. keyboardShortcuts: function() {
  433. module.verbose('Adding keyboard shortcuts');
  434. $document
  435. .on('keyup' + eventNamespace, module.event.keyboard)
  436. ;
  437. }
  438. },
  439. save: {
  440. focus: function() {
  441. $focusedElement = $(document.activeElement).blur();
  442. }
  443. },
  444. restore: {
  445. focus: function() {
  446. if($focusedElement && $focusedElement.length > 0) {
  447. $focusedElement.focus();
  448. }
  449. }
  450. },
  451. remove: {
  452. active: function() {
  453. $module.removeClass(className.active);
  454. },
  455. clickaway: function() {
  456. if(settings.closable) {
  457. $dimmer
  458. .off('click' + elementNamespace)
  459. ;
  460. }
  461. },
  462. screenHeight: function() {
  463. if(module.cache.height > module.cache.pageHeight) {
  464. module.debug('Removing page height');
  465. $body
  466. .css('height', '')
  467. ;
  468. }
  469. },
  470. keyboardShortcuts: function() {
  471. module.verbose('Removing keyboard shortcuts');
  472. $document
  473. .off('keyup' + eventNamespace)
  474. ;
  475. },
  476. scrolling: function() {
  477. $dimmable.removeClass(className.scrolling);
  478. $module.removeClass(className.scrolling);
  479. }
  480. },
  481. cacheSizes: function() {
  482. var
  483. modalHeight = $module.outerHeight()
  484. ;
  485. if(module.cache === undefined || modalHeight !== 0) {
  486. module.cache = {
  487. pageHeight : $(document).outerHeight(),
  488. height : modalHeight + settings.offset,
  489. contextHeight : (settings.context == 'body')
  490. ? $(window).height()
  491. : $dimmable.height()
  492. };
  493. }
  494. module.debug('Caching modal and container sizes', module.cache);
  495. },
  496. can: {
  497. fit: function() {
  498. return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);
  499. }
  500. },
  501. is: {
  502. active: function() {
  503. return $module.hasClass(className.active);
  504. },
  505. animating: function() {
  506. return $module.transition('is supported')
  507. ? $module.transition('is animating')
  508. : $module.is(':visible')
  509. ;
  510. },
  511. scrolling: function() {
  512. return $dimmable.hasClass(className.scrolling);
  513. },
  514. modernBrowser: function() {
  515. // appName for IE11 reports 'Netscape' can no longer use
  516. return !(window.ActiveXObject || "ActiveXObject" in window);
  517. }
  518. },
  519. set: {
  520. autofocus: function() {
  521. if(settings.autofocus) {
  522. var
  523. $inputs = $module.find(':input:visible'),
  524. $autofocus = $inputs.filter('[autofocus]'),
  525. $input = ($autofocus.length > 0)
  526. ? $autofocus
  527. : $inputs
  528. ;
  529. $input.first().focus();
  530. }
  531. },
  532. clickaway: function() {
  533. if(settings.closable) {
  534. $dimmer
  535. .on('click' + elementNamespace, module.event.click)
  536. ;
  537. }
  538. },
  539. screenHeight: function() {
  540. if( module.can.fit() ) {
  541. $body.css('height', '');
  542. }
  543. else {
  544. module.debug('Modal is taller than page content, resizing page height');
  545. $body
  546. .css('height', module.cache.height + (settings.padding * 2) )
  547. ;
  548. }
  549. },
  550. active: function() {
  551. $module.addClass(className.active);
  552. },
  553. scrolling: function() {
  554. $dimmable.addClass(className.scrolling);
  555. $module.addClass(className.scrolling);
  556. },
  557. type: function() {
  558. if(module.can.fit()) {
  559. module.verbose('Modal fits on screen');
  560. if(!module.othersActive) {
  561. module.remove.scrolling();
  562. }
  563. }
  564. else {
  565. module.verbose('Modal cannot fit on screen setting to scrolling');
  566. module.set.scrolling();
  567. }
  568. },
  569. position: function() {
  570. module.verbose('Centering modal on page', module.cache);
  571. if(module.can.fit()) {
  572. $module
  573. .css({
  574. top: '',
  575. marginTop: -(module.cache.height / 2)
  576. })
  577. ;
  578. }
  579. else {
  580. $module
  581. .css({
  582. marginTop : '',
  583. top : $document.scrollTop()
  584. })
  585. ;
  586. }
  587. },
  588. undetached: function() {
  589. $dimmable.addClass(className.undetached);
  590. }
  591. },
  592. setting: function(name, value) {
  593. module.debug('Changing setting', name, value);
  594. if( $.isPlainObject(name) ) {
  595. $.extend(true, settings, name);
  596. }
  597. else if(value !== undefined) {
  598. settings[name] = value;
  599. }
  600. else {
  601. return settings[name];
  602. }
  603. },
  604. internal: function(name, value) {
  605. if( $.isPlainObject(name) ) {
  606. $.extend(true, module, name);
  607. }
  608. else if(value !== undefined) {
  609. module[name] = value;
  610. }
  611. else {
  612. return module[name];
  613. }
  614. },
  615. debug: function() {
  616. if(settings.debug) {
  617. if(settings.performance) {
  618. module.performance.log(arguments);
  619. }
  620. else {
  621. module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
  622. module.debug.apply(console, arguments);
  623. }
  624. }
  625. },
  626. verbose: function() {
  627. if(settings.verbose && settings.debug) {
  628. if(settings.performance) {
  629. module.performance.log(arguments);
  630. }
  631. else {
  632. module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
  633. module.verbose.apply(console, arguments);
  634. }
  635. }
  636. },
  637. error: function() {
  638. module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
  639. module.error.apply(console, arguments);
  640. },
  641. performance: {
  642. log: function(message) {
  643. var
  644. currentTime,
  645. executionTime,
  646. previousTime
  647. ;
  648. if(settings.performance) {
  649. currentTime = new Date().getTime();
  650. previousTime = time || currentTime;
  651. executionTime = currentTime - previousTime;
  652. time = currentTime;
  653. performance.push({
  654. 'Name' : message[0],
  655. 'Arguments' : [].slice.call(message, 1) || '',
  656. 'Element' : element,
  657. 'Execution Time' : executionTime
  658. });
  659. }
  660. clearTimeout(module.performance.timer);
  661. module.performance.timer = setTimeout(module.performance.display, 500);
  662. },
  663. display: function() {
  664. var
  665. title = settings.name + ':',
  666. totalTime = 0
  667. ;
  668. time = false;
  669. clearTimeout(module.performance.timer);
  670. $.each(performance, function(index, data) {
  671. totalTime += data['Execution Time'];
  672. });
  673. title += ' ' + totalTime + 'ms';
  674. if(moduleSelector) {
  675. title += ' \'' + moduleSelector + '\'';
  676. }
  677. if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
  678. console.groupCollapsed(title);
  679. if(console.table) {
  680. console.table(performance);
  681. }
  682. else {
  683. $.each(performance, function(index, data) {
  684. console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
  685. });
  686. }
  687. console.groupEnd();
  688. }
  689. performance = [];
  690. }
  691. },
  692. invoke: function(query, passedArguments, context) {
  693. var
  694. object = instance,
  695. maxDepth,
  696. found,
  697. response
  698. ;
  699. passedArguments = passedArguments || queryArguments;
  700. context = element || context;
  701. if(typeof query == 'string' && object !== undefined) {
  702. query = query.split(/[\. ]/);
  703. maxDepth = query.length - 1;
  704. $.each(query, function(depth, value) {
  705. var camelCaseValue = (depth != maxDepth)
  706. ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
  707. : query
  708. ;
  709. if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
  710. object = object[camelCaseValue];
  711. }
  712. else if( object[camelCaseValue] !== undefined ) {
  713. found = object[camelCaseValue];
  714. return false;
  715. }
  716. else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
  717. object = object[value];
  718. }
  719. else if( object[value] !== undefined ) {
  720. found = object[value];
  721. return false;
  722. }
  723. else {
  724. return false;
  725. }
  726. });
  727. }
  728. if ( $.isFunction( found ) ) {
  729. response = found.apply(context, passedArguments);
  730. }
  731. else if(found !== undefined) {
  732. response = found;
  733. }
  734. if($.isArray(returnedValue)) {
  735. returnedValue.push(response);
  736. }
  737. else if(returnedValue !== undefined) {
  738. returnedValue = [returnedValue, response];
  739. }
  740. else if(response !== undefined) {
  741. returnedValue = response;
  742. }
  743. return found;
  744. }
  745. };
  746. if(methodInvoked) {
  747. if(instance === undefined) {
  748. module.initialize();
  749. }
  750. module.invoke(query);
  751. }
  752. else {
  753. if(instance !== undefined) {
  754. instance.invoke('destroy');
  755. }
  756. module.initialize();
  757. }
  758. })
  759. ;
  760. return (returnedValue !== undefined)
  761. ? returnedValue
  762. : this
  763. ;
  764. };
  765. $.fn.modal.settings = {
  766. name : 'Modal',
  767. namespace : 'modal',
  768. debug : false,
  769. verbose : false,
  770. performance : true,
  771. allowMultiple : false,
  772. detachable : true,
  773. closable : true,
  774. autofocus : true,
  775. dimmerSettings : {
  776. closable : false,
  777. useCSS : true
  778. },
  779. context : 'body',
  780. queue : false,
  781. duration : 500,
  782. easing : 'easeOutExpo',
  783. offset : 0,
  784. transition : 'scale',
  785. padding : 50,
  786. onShow : function(){},
  787. onHide : function(){},
  788. onVisible : function(){},
  789. onHidden : function(){},
  790. onApprove : function(){ return true; },
  791. onDeny : function(){ return true; },
  792. selector : {
  793. close : '.close, .actions .button',
  794. approve : '.actions .positive, .actions .approve, .actions .ok',
  795. deny : '.actions .negative, .actions .deny, .actions .cancel',
  796. modal : '.ui.modal'
  797. },
  798. error : {
  799. dimmer : 'UI Dimmer, a required component is not included in this page',
  800. method : 'The method you called is not defined.',
  801. notFound : 'The element you specified could not be found'
  802. },
  803. className : {
  804. active : 'active',
  805. animating : 'animating',
  806. scrolling : 'scrolling',
  807. undetached : 'undetached'
  808. }
  809. };
  810. })( jQuery, window , document );