APIs

Show:
  1. /**
  2. TutorialView used to play live tutorials of the different elements of StudioLite
  3. @class TutorialView
  4. @constructor
  5. @return {Object} instantiated TutorialViewView
  6. **/
  7.  
  8. // debug : define(['jquery', 'backbone', 'enjoy'], function ($, Backbone, enjoy) {
  9. define(['jquery', 'backbone'], function ($, Backbone) {
  10.  
  11. var TutorialViewView = Backbone.View.extend({
  12.  
  13. /**
  14. Constructor
  15. @method initialize
  16. **/
  17. initialize: function () {
  18. var self = this;
  19. self.m_selectedView = undefined;
  20. self.m_appSectionFunction = undefined;
  21. self.m_delay = 0;
  22. self.m_ignoreResizeInStep = [1,36]; // don't close wizard even on resize at this step (download files minor browser size change)
  23. self.m_enjoyHint;
  24. self._listenViewStacks();
  25. self._listenTutorialSelected();
  26. self._listenAppSized();
  27. self._listenCampaignListLoaded();
  28. self._listenWizardError();
  29. },
  30.  
  31. /**
  32. Listen to error in wizard and do clean exit
  33. @method _listenWizardError
  34. **/
  35. _listenWizardError: function () {
  36. var self = this;
  37. BB.comBroker.listen(BB.EVENTS.WIZARD_EXIT, function () {
  38. if (self.m_enjoyHint)
  39. self.m_enjoyHint.trigger('skip');
  40. });
  41. },
  42.  
  43. /**
  44. Close enjoyhint wizard
  45. @method _closeWizard
  46. **/
  47. _closeWizard: function () {
  48. var self = this;
  49. log('closing scene');
  50. if (!self.m_enjoyHint)
  51. return;
  52. // restore all elements that were touch during enjoy wizard steps
  53. $('.primeComponent').closest('.addBlockListItems').show();
  54. $('#addResourcesBlockListContainer', '#sceneAddNewBlock').show();
  55. $('#addComponentsBlockListContainer', '#sceneAddNewBlock').show();
  56. $('#sceneSelectorList').children().show();
  57. try {
  58. if (self.m_enjoyHint) {
  59. $.each(self.m_enjoyHint, function (k) {
  60. self[k] = undefined;
  61. });
  62. }
  63. } catch (e) {
  64. }
  65. self.m_enjoyHint = undefined;
  66. },
  67.  
  68. /**
  69. Animation campaign selector tutorial
  70. @method _tutorialCampaign
  71. **/
  72. _tutorialCampaignSelector: function () {
  73. var self = this;
  74.  
  75. var enjoyhint_script_steps = [
  76.  
  77. {
  78. "click #newCampaign": $(Elements.WSTEP0).html(),
  79. "skipButton": {text: "quit"},
  80. left: 10,
  81. right: 10,
  82. top: 6,
  83. bottom: 6,
  84. onBeforeStart: function () {
  85. log('STEP 1');
  86. }
  87. },
  88. {
  89. "key #newCampaignName": $(Elements.WSTEP1).html(),
  90. "skipButton": {text: "quit"},
  91. keyCode: 13,
  92. onBeforeStart: function () {
  93. log('STEP 2');
  94. }
  95. },
  96. {
  97. event: "click",
  98. selector: $('#orientationView').find('img').eq(0),
  99. "skipButton": {text: "quit"},
  100. description: $(Elements.WSTEP2).html(),
  101. timeout: 500,
  102. margin: 0,
  103. padding: 0,
  104. onBeforeStart: function () {
  105. log('STEP 3');
  106. }
  107. },
  108. {
  109. "click #resolutionList": $(Elements.WSTEP3).html(),
  110. "skipButton": {text: "quit"},
  111. timeout: 500,
  112. bottom: 250,
  113. margin: 0,
  114. right: 500,
  115. padding: 0,
  116. onBeforeStart: function () {
  117. log('STEP 4');
  118. }
  119. },
  120. {
  121. event: "click",
  122. "skipButton": {text: "quit"},
  123. selector: $('#screenLayoutList'),
  124. description: $(Elements.WSTEP4).html(),
  125. timeout: 500,
  126. bottom: 250,
  127. onBeforeStart: function () {
  128. log('STEP 5');
  129. }
  130. },
  131. {
  132. "next #screenSelectorContainer": $(Elements.WSTEP5).html(),
  133. timeout: 1500,
  134. "skipButton": {text: "quit"}
  135. },
  136. {
  137. "click #toggleStorylineCollapsible": $(Elements.WSTEP6).html(),
  138. "skipButton": {text: "quit"},
  139. onBeforeStart: function () {
  140. BB.comBroker.getService(BB.SERVICES.STORYLINE).collapseStoryLine();
  141. log('STEP 6');
  142. }
  143. },
  144. {
  145. "next #storylineContainerCollapse": $(Elements.WSTEP7).html(),
  146. "skipButton": {text: "quit"},
  147. onBeforeStart: function () {
  148. log('STEP 7');
  149. }
  150. },
  151. {
  152. "click #selectNextChannel": $(Elements.WSTEP8).html(),
  153. "skipButton": {text: "quit"},
  154. left: 6,
  155. right: 6,
  156. top: 6,
  157. bottom: 6,
  158. onBeforeStart: function () {
  159. log('STEP 8');
  160. }
  161. },
  162. {
  163. "click #addBlockButton": $(Elements.WSTEP9).html(),
  164. "skipButton": {text: "quit"},
  165. left: 6,
  166. right: 6,
  167. top: 6,
  168. bottom: 6,
  169. onBeforeStart: function () {
  170. log('STEP 9');
  171. }
  172. },
  173. {
  174. event: "click",
  175. "skipButton": {text: "quit"},
  176. selector: $('#addResourcesBlockListContainer a'),
  177. description: $(Elements.WSTEP10).html(),
  178. timeout: 400,
  179. padding: 15,
  180. margin: 15,
  181. onBeforeStart: function () {
  182. log('STEP 10');
  183. }
  184. },
  185. {
  186. event: "click",
  187. "skipButton": {text: "quit"},
  188. selector: $('#addResourceBlockList'),
  189. description: $(Elements.WSTEP11).html(),
  190. timeout: 1000,
  191. bottom: 400,
  192. top: 20,
  193. left: 25,
  194. right: 25,
  195. onBeforeStart: function () {
  196. log('STEP 11');
  197. }
  198. },
  199. {
  200. "click .channelListItems": $(Elements.WSTEP12).html(),
  201. "skipButton": {text: "quit"},
  202. onBeforeStart: function () {
  203. log('STEP 12');
  204. }
  205. },
  206. {
  207. "next #blockProperties": $(Elements.WSTEP13).html(),
  208. "skipButton": {text: "quit"},
  209. onBeforeStart: function () {
  210. log('STEP 13');
  211. }
  212. },
  213. {
  214. "next #channelBlockProps": $(Elements.WSTEP14).html(),
  215. "skipButton": {text: "quit"},
  216. onBeforeStart: function () {
  217. log('STEP 14');
  218. }
  219. },
  220. {
  221. "click #editScreenLayout": $(Elements.WSTEP15).html(),
  222. "skipButton": {text: "quit"},
  223. left: 6,
  224. right: 6,
  225. top: 6,
  226. bottom: 6,
  227. onBeforeStart: function () {
  228. log('STEP 15');
  229. }
  230. },
  231. {
  232. "click #layoutEditorAddNew": $(Elements.WSTEP16).html(),
  233. "skipButton": {text: "quit"},
  234. left: 8,
  235. right: 8,
  236. top: 6,
  237. bottom: 6,
  238. onBeforeStart: function () {
  239. log('STEP 16');
  240. }
  241. },
  242. {
  243. "next #screenLayoutEditorCanvasWrap": $(Elements.WSTEP17).html(),
  244. "skipButton": {text: "quit"},
  245. bottom: 200,
  246. right: 100,
  247. onBeforeStart: function () {
  248. log('STEP 17');
  249. }
  250. },
  251. {
  252. event: "click",
  253. selector: $('#prev', "#screenLayoutEditorView"),
  254. "skipButton": {text: "quit"},
  255. description: $(Elements.WSTEP18).html(),
  256. onBeforeStart: function () {
  257. log('STEP 18');
  258. }
  259. },
  260. {
  261. event: "click",
  262. selector: '#screenSelectorContainerCollapse',
  263. "skipButton": {text: "quit"},
  264. description: $(Elements.WSTEP19).html(),
  265. timeout: 500,
  266. bottom: 10,
  267. onBeforeStart: function () {
  268. log('STEP 19');
  269. }
  270. },
  271. {
  272. event: "click",
  273. selector: $('.scenesPanel', '#appNavigator'),
  274. "skipButton": {text: "quit"},
  275. description: $(Elements.WSTEP20).html(),
  276. right: 10,
  277. top: 6,
  278. bottom: 10,
  279. onBeforeStart: function () {
  280. log('STEP 20');
  281. }
  282. },
  283.  
  284. {
  285. event: "click",
  286. selector: $('#newScene'),
  287. "skipButton": {text: "quit"},
  288. description: $(Elements.WSTEP21).html(),
  289. left: 8,
  290. right: 8,
  291. top: 5,
  292. bottom: 5,
  293. onBeforeStart: function () {
  294. log('STEP 21');
  295. }
  296. },
  297. {
  298. event: "click",
  299. selector: '#sceneSelectorList',
  300. "skipButton": {text: "quit"},
  301. description: $(Elements.WSTEP22).html(),
  302. bottom: 400,
  303. timeout: 300,
  304. onBeforeStart: function () {
  305. //$('#sceneSelectorList').children().:not(:last-child)')fadeOut();
  306. var sceneCreationService = BB.comBroker.getService(BB.SERVICES['SCENES_CREATION_VIEW']);
  307. sceneCreationService.createBlankScene('New Scene from Wizard');
  308. $('a:not(:last-child)', '#sceneSelectorList').slideUp();
  309. log('STEP 22');
  310. }
  311. },
  312. {
  313. event: "click",
  314. selector: '.sceneAddNew',
  315. "skipButton": {text: "quit"},
  316. description: $(Elements.WSTEP23).html(),
  317. right: 8,
  318. left: 8,
  319. top: 5,
  320. bottom: 5,
  321. timeout: 300,
  322. onBeforeStart: function () {
  323. log('STEP 23');
  324. }
  325. },
  326. {
  327. event: "click",
  328. selector: '#sceneAddNewBlock',
  329. "skipButton": {text: "quit"},
  330. description: $(Elements.WSTEP24).html(),
  331. timeout: 500,
  332. right: 300,
  333. left: 50,
  334. top: 175,
  335. onBeforeStart: function () {
  336. log('STEP 24');
  337. $('#sceneAddNewBlock').find('[data-toggle]').trigger('click');
  338. $('.primeComponent').closest('.addBlockListItems').hide();
  339. $('#addResourcesBlockListContainer', '#sceneAddNewBlock').hide();
  340. }
  341. },
  342. {
  343. "next #sceneCanvas": $(Elements.WSTEP25).html(),
  344. event: "next",
  345. timeout: 300,
  346. bottom: 200,
  347. "skipButton": {text: "quit"},
  348. onBeforeStart: function () {
  349. log('STEP 25');
  350. }
  351. },
  352. {
  353. event: "click",
  354. selector: '.sceneAddNew',
  355. "skipButton": {text: "quit"},
  356. description: $(Elements.WSTEP26).html(),
  357. right: 8,
  358. left: 8,
  359. top: 5,
  360. bottom: 5,
  361. timeout: 300,
  362. onBeforeStart: function () {
  363. log('STEP 26');
  364. }
  365. },
  366. {
  367. event: "click",
  368. selector: '#sceneAddNewBlock',
  369. "skipButton": {text: "quit"},
  370. description: $(Elements.WSTEP24).html(),
  371. timeout: 500,
  372. right: 300,
  373. left: 50,
  374. top: 175,
  375. onBeforeStart: function () {
  376. log('STEP 27');
  377. $('#sceneAddNewBlock').find('[data-toggle]').trigger('click');
  378. $('#addResourcesBlockListContainer', '#sceneAddNewBlock').show();
  379. $('#addComponentsBlockListContainer', '#sceneAddNewBlock').hide();
  380. $('.primeComponent').closest('.addBlockListItems').hide();
  381. }
  382. },
  383. {
  384. "next #sceneCanvas": $(Elements.WSTEP28).html(),
  385. event: "next",
  386. timeout: 300,
  387. bottom: 200,
  388. "skipButton": {text: "quit"},
  389. onBeforeStart: function () {
  390. log('STEP 28');
  391. }
  392. },
  393. {
  394. event: "click",
  395. selector: $('.campaignManagerView', '#appNavigator'),
  396. "skipButton": {text: "quit"},
  397. description: $(Elements.WSTEP29).html(),
  398. right: 10,
  399. left: 6,
  400. top: 10,
  401. bottom: 10,
  402. onBeforeStart: function () {
  403. log('STEP 29');
  404. }
  405. },
  406. {
  407. "click #toggleStorylineCollapsible": $(Elements.WSTEP30).html(),
  408. "skipButton": {text: "quit"},
  409. onBeforeStart: function () {
  410. BB.comBroker.getService(BB.SERVICES.STORYLINE).collapseStoryLine();
  411. log('STEP 30');
  412. }
  413. },
  414. {
  415. left: 10,
  416. right: 10,
  417. "click #selectNextChannel": $(Elements.WSTEP31).html(),
  418. "skipButton": {text: "quit"},
  419. onBeforeStart: function () {
  420. log('STEP 31');
  421. }
  422. },
  423. {
  424. "click #addBlockButton": $(Elements.WSTEP32).html(),
  425. left: 6,
  426. right: 6,
  427. top: 6,
  428. bottom: 6,
  429. "skipButton": {text: "quit"},
  430. onBeforeStart: function () {
  431. log('STEP 32');
  432. $('#addResourcesBlockListContainer').find('[data-toggle]').trigger('click');
  433. }
  434. },
  435. {
  436. event: "click",
  437. "skipButton": {text: "quit"},
  438. selector: $('#addSceneBlockListContainer a'),
  439. description: $(Elements.WSTEP33).html(),
  440. timeout: 400,
  441. padding: 15,
  442. margin: 15,
  443. onBeforeStart: function () {
  444. log('STEP 33');
  445. }
  446. },
  447. {
  448. event: "click",
  449. "skipButton": {text: "quit"},
  450. selector: $('#addSceneBlockList'),
  451. description: $(Elements.WSTEP34).html(),
  452. timeout: 700,
  453. left: 25,
  454. right: 25,
  455. bottom: 25,
  456. top: 25,
  457. onBeforeStart: function () {
  458. log('STEP 34');
  459. }
  460. },
  461. {
  462. event: "click",
  463. selector: $('.installPanel', '#appNavigator'),
  464. "skipButton": {text: "quit"},
  465. timeout: 600,
  466. description: $(Elements.WSTEP35).html(),
  467. right: 10,
  468. top: 10,
  469. bottom: 10,
  470. hideInEnterprise: true,
  471. onBeforeStart: function () {
  472. log('STEP 35');
  473. }
  474. },
  475. {
  476. "next #installPanel": $(Elements.WSTEP36).html(),
  477. hideInEnterprise: true,
  478. "skipButton": {text: "quit"},
  479. onBeforeStart: function () {
  480. log('STEP 36');
  481. }
  482. },
  483. {
  484. "next #installPanel": $(Elements.WSTEP37).html(),
  485. "skipButton": {text: "quit"},
  486. hideInEnterprise: true,
  487. onBeforeStart: function () {
  488. log('STEP 37');
  489. }
  490. },
  491. {
  492. event: "click",
  493. selector: $('.stationsPanel', '#appNavigator'),
  494. "skipButton": {text: "quit"},
  495. timeout: 600,
  496. top: 10,
  497. bottom: 10,
  498. description: $(Elements.WSTEP38).html(),
  499. right: 10,
  500. onBeforeStart: function () {
  501. log('STEP 38');
  502. }
  503. },
  504. {
  505. "next #stationsPanel": $(Elements.WSTEP39).html(),
  506. timeout: 600,
  507. "skipButton": {text: "quit"},
  508. bottom: 400,
  509. onBeforeStart: function () {
  510. log('STEP 39');
  511. }
  512. },
  513. {
  514. event: "click",
  515. selector: $('.helpPanel', '#appNavigator'),
  516. "skipButton": {text: "quit"},
  517. timeout: 600,
  518. description: $(Elements.WSTEP40).html(),
  519. right: 10,
  520. top: 10,
  521. bottom: 10,
  522. hideInEnterprise: true,
  523. onBeforeStart: function () {
  524. log('STEP 40');
  525. }
  526. },
  527. {
  528. "next #helpPanel": $(Elements.WSTEP41).html(),
  529. timeout: 200,
  530. hideInEnterprise: true,
  531. "skipButton": {text: "quit"},
  532. onBeforeStart: function () {
  533. log('STEP 41');
  534. }
  535. },
  536. {
  537. event: "next",
  538. timeout: 200,
  539. selector: $('#appEntry'),
  540. "skipButton": {text: "quit"},
  541. description: $(Elements.WSTEP42).html(),
  542. bottom: 600,
  543. onBeforeStart: function () {
  544. log('STEP 42');
  545. setTimeout(function () {
  546. $('#enjoyhint_arrpw_line').fadeOut();
  547. }, 1000);
  548. }
  549. }
  550. ];
  551.  
  552. self.m_enjoyHint = new EnjoyHint({
  553. onStart: function () {
  554. },
  555. onEnd: function () {
  556. self._closeWizard();
  557. },
  558. onSkip: function () {
  559. self._closeWizard();
  560. }
  561. });
  562.  
  563. // if enterprise mode, remove steps set to hideInEnterprise = true
  564. if (pepper.getUserData().resellerID != 1){
  565. _.forEach(enjoyhint_script_steps, function (item, index) {
  566. if (item.hideInEnterprise == true) {
  567. enjoyhint_script_steps = _.without(enjoyhint_script_steps,item);
  568. }
  569. });
  570. }
  571.  
  572. log(enjoyhint_script_steps.length);
  573. self.m_enjoyHint.set(enjoyhint_script_steps);
  574. self.m_enjoyHint.run();
  575. },
  576.  
  577. /**
  578. When campaign list loaded, if first time user, suggest wizard
  579. @method _listenCampaignListLoaded
  580. **/
  581. _listenCampaignListLoaded: function () {
  582. var self = this;
  583. BB.comBroker.listen(BB.EVENTS.CAMPAIGN_LIST_LOADING, function (e) {
  584. $(Elements.LIVE_TUTORIAL).trigger('click');
  585. });
  586. },
  587.  
  588. /**
  589. Remove live tutorial on app resize
  590. @method _listenAppSized
  591. **/
  592. _listenAppSized: function () {
  593. var self = this;
  594. BB.comBroker.listen(BB.EVENTS.APP_SIZED, function () {
  595. if (!self.m_enjoyHint)
  596. return;
  597. var step = self.m_enjoyHint.getCurrentStep();
  598. var exists = _.contains(self.m_ignoreResizeInStep, step);
  599. if (exists)
  600. return;
  601. self.m_enjoyHint.trigger('skip');
  602. });
  603. },
  604.  
  605. /**
  606. Close live tutorial
  607. @method _listenCloseTutorial
  608. **/
  609. _listenCloseTutorial: function () {
  610. var self = this;
  611. },
  612.  
  613. /**
  614. Load up live tutorial
  615. @method _listenTutorialSelected
  616. **/
  617. _listenTutorialSelected: function () {
  618. var self = this;
  619. $(self.el).on('click', function () {
  620. self._loadTutorial();
  621. });
  622. },
  623.  
  624. /**
  625. Animation campaign tutorial
  626. @method _tutorialCampaign
  627. **/
  628. _tutorialCampaign: function () {
  629. var self = this;
  630. BB.comBroker.fire(BB.EVENTS.CAMPAIGN_EXPANDED_VIEW, this);
  631. },
  632.  
  633. /**
  634. Animation stations tutorial
  635. @method _tutorialStations
  636. **/
  637. _tutorialStations: function () {
  638. var self = this;
  639. },
  640.  
  641. /**
  642. Animation resource tutorial
  643. @method _tutorialResourcePanel
  644. **/
  645. _tutorialResourcePanel: function () {
  646. var self = this;
  647. },
  648.  
  649. /**
  650. Animation install tutorial
  651. @method _tutorialInstallPanel
  652. **/
  653. _tutorialInstallPanel: function () {
  654. var self = this;
  655. },
  656.  
  657. /**
  658. Animation screen layout tutorial
  659. @method _tutorialScreenLayout
  660. **/
  661. _tutorialScreenLayout: function () {
  662. var self = this;
  663. },
  664.  
  665. /**
  666. Animation scenes tutorial
  667. @method _tutorialScenes
  668. **/
  669. _tutorialScenes: function () {
  670. var self = this;
  671. },
  672.  
  673. /**
  674. Animation scene selector tutorial
  675. @method _tutorialScenesSelector
  676. **/
  677. _tutorialScenesSelector: function () {
  678. var self = this;
  679. },
  680.  
  681. /**
  682. Animation screen layout editor tutorial
  683. @method _tutorialScreenLayoutEditor
  684. **/
  685. _tutorialScreenLayoutEditor: function () {
  686. var self = this;
  687. },
  688.  
  689. /**
  690. Animation help tutorial
  691. @method _tutorialHelp
  692. **/
  693. _tutorialHelp: function () {
  694. var self = this;
  695. },
  696.  
  697. /**
  698. Animation add new block tutorial
  699. @method _tutorialAddBlock
  700. **/
  701. _tutorialAddBlock: function () {
  702. var self = this;
  703. },
  704.  
  705. /**
  706. Animation tutorial when no specific exists
  707. @method _tutorialDefault
  708. **/
  709. _tutorialDefault: function () {
  710. var self = this;
  711. },
  712.  
  713. /**
  714. Listen to changes in StackView selection so we can bind to appropriate tutorial per current StackView selection
  715. @method _listenViewStacks
  716. **/
  717. _listenViewStacks: function () {
  718. var self = this;
  719. BB.comBroker.listen(BB.EVENTS.SELECTED_STACK_VIEW, function (e) {
  720. self.m_selectedView = '#' + e.context.el.id;
  721. // log('view: ' + self.m_selectedView);
  722. switch (self.m_selectedView) {
  723. case Elements.CAMPAIGN_SELECTOR:
  724. {
  725. }
  726. case Elements.CAMPAIGN_MANAGER_VIEW:
  727. {
  728. if (!BB.SERVICES.CAMPAIGN_SELECTOR)
  729. return;
  730. if (_.isUndefined(BB.comBroker.getService(BB.SERVICES.CAMPAIGN_SELECTOR)))
  731. return;
  732. if (BB.comBroker.getService(BB.SERVICES.CAMPAIGN_SELECTOR).getSelectedCampaign() == -1) {
  733. self.m_appSectionFunction = self._tutorialCampaignSelector;
  734. } else {
  735. self.m_appSectionFunction = self._tutorialCampaign;
  736. }
  737. break;
  738. }
  739. case Elements.RESOURCES_PANEL:
  740. {
  741. self.m_appSectionFunction = self._tutorialResourcePanel;
  742. break;
  743. }
  744. case Elements.CAMPAIGN:
  745. {
  746. self.m_appSectionFunction = self._tutorialCampaign;
  747. break;
  748. }
  749. case Elements.SCREEN_LAYOUT_EDITOR_VIEW:
  750. {
  751. self.m_appSectionFunction = self._tutorialScreenLayoutEditor;
  752. break;
  753. }
  754. case Elements.STATIONS_PANEL:
  755. {
  756. self.m_appSectionFunction = self._tutorialStations;
  757. break;
  758. }
  759. case Elements.SCREEN_LAYOUT_SELECTOR:
  760. {
  761. self.m_appSectionFunction = self._tutorialScreenLayout;
  762. break;
  763. }
  764. case Elements.SCENE_SELECTOR:
  765. {
  766. self.m_appSectionFunction = self._tutorialScenesSelector;
  767. break;
  768. }
  769. case Elements.SCENE_SLIDER_ELEMENT_VIEW:
  770. {
  771. self.m_appSectionFunction = self._tutorialScenes;
  772. break;
  773. }
  774. case Elements.ADD_BLOCK_ELEM_VIEW:
  775. {
  776. }
  777. case Elements.SCENE_ADD_NEW_BLOCK:
  778. {
  779. self.m_appSectionFunction = self._tutorialAddBlock;
  780. break;
  781. }
  782. case Elements.HELP_PANEL:
  783. {
  784. self.m_appSectionFunction = self._tutorialHelp;
  785. break;
  786. }
  787. case Elements.INSTALL_PANEL:
  788. {
  789. self.m_appSectionFunction = self._tutorialInstallPanel;
  790. break;
  791. }
  792. case Elements.SETTINGS_PANEL:
  793. {
  794. }
  795. case Elements.LOGOUT_PANEL:
  796. {
  797. }
  798. case Elements.CAMPAIGN_NAME_SELECTOR_VIEW:
  799. {
  800. }
  801. case Elements.ORIENTATION_SELECTOR:
  802. {
  803. }
  804. case Elements.RESOLUTION_SELECTOR:
  805. {
  806. }
  807. case Elements.PRO_STUDIO_PANEL:
  808. {
  809. self.m_appSectionFunction = self._tutorialDefault;
  810. }
  811. }
  812. });
  813. },
  814.  
  815. /**
  816. Load currently selected tutorial per StackView selection
  817. @method _loadTutorial
  818. **/
  819. _loadTutorial: function () {
  820. var self = this;
  821. if (!self.m_appSectionFunction)
  822. return;
  823. self.m_delay = 0;
  824.  
  825. if (self.m_appSectionFunction == self._tutorialCampaignSelector){
  826. require(['enjoy'], function (enjoy) {
  827. self.m_appSectionFunction();
  828. self._listenCloseTutorial();
  829. });
  830. } else {
  831. bootbox.alert($(Elements.MSG_BOOTBOX_WIARD_SWITCH_CAMPAIGN_LIST).text());
  832. }
  833.  
  834.  
  835. //self.m_appSectionFunction();
  836.  
  837.  
  838. }
  839. });
  840.  
  841. return TutorialViewView;
  842. });
  843.  
  844. // TweenMax.to($(i_el), 2, {delay: self.m_delay, top: i_top, left: i_left, rotation: i_rotation, scale: i_scale, skewX: i_skewX, ease: 'Power4.easeOut'});
  845. // TweenMax.to($(i_el), 2, {delay: self.m_delay, top: i_top, left: i_left, rotation: i_rotation, scale: i_scale, skewX: i_skewX, ease: 'Power4.easeOut'});
  846. // TweenMax.to($(arrow), 2, {delay: 0.1, top: offset.top + 75, left: offset.left + 35, rotation: 20, scale: '2.0', skewX: 20, ease: 'Power4.easeOut'});
  847. // TweenMax.to($('#txt'), 2, {delay: 0.5, top: offset.top + 45, left: offset.left + -100, rotation: 3, skewX: 2, ease: 'Power4.easeOut'});
  848. // var tl = new TimelineMax({repeatDelay: 1, 'yoyo': true});
  849. // tl.from($('#arrow'),2,{left: '1500px', scale: '2.0', ease: 'Power4.easeOut'});
  850. // tl.play();
  851. // TweenMax.to($('#arrow'), 1, {left: "300px", opacity: 1, repeat: 1, yoyo: true, ease: 'Circ.easeIn'});
  852. // TweenMax.to($('#arrow'),1,{left: '800px', repeat:3, ease:'Circ.easeIn'});