src/js/widgets/playerWidget.js
branchpopcorn-port
changeset 416 f3237cce149e
parent 398 d1883378b822
child 440 bf9307640e55
equal deleted inserted replaced
415:ffadfe55f9f7 416:f3237cce149e
    74 */
    74 */
    75 IriSP.PlayerWidget.prototype.playButtonUpdater = function() {
    75 IriSP.PlayerWidget.prototype.playButtonUpdater = function() {
    76   var status = this._Popcorn.media.paused;
    76   var status = this._Popcorn.media.paused;
    77   
    77   
    78   if ( status == true ){        
    78   if ( status == true ){        
    79     this.selector.find(".ui-icon-play").css( "background-position", "-16px -160px" );
       
    80     this.selector.find(".Ldt-CtrlPlay").attr("title", "Play");
    79     this.selector.find(".Ldt-CtrlPlay").attr("title", "Play");
       
    80    
       
    81     // we use templToHTML because it has some predefined
       
    82     // vars like where to get the images
       
    83     var templ = IriSP.templToHTML("url({{img_dir}}/pause_sprite.png)");
       
    84     this.selector.find(".Ldt-CtrlPlay").css("background-image", templ);
       
    85 
    81   } else {
    86   } else {
    82     this.selector.find(".ui-icon-play").css( "background-position","0px -160px" );
       
    83     this.selector.find(".Ldt-CtrlPlay").attr("title", "Pause");
    87     this.selector.find(".Ldt-CtrlPlay").attr("title", "Pause");
       
    88 
       
    89     // we use templToHTML because it has some predefined
       
    90     // vars like where to get the images
       
    91     var templ = IriSP.templToHTML("url({{img_dir}}/play_sprite.png)");
       
    92     this.selector.find(".Ldt-CtrlPlay").css("background-image", templ);
    84   }  
    93   }  
    85 };
    94 };
    86 
    95 
    87 
    96 
    88 IriSP.PlayerWidget.prototype.playHandler = function() {
    97 IriSP.PlayerWidget.prototype.playHandler = function() {
   134       this._Popcorn.trigger("IriSP.search.open");
   143       this._Popcorn.trigger("IriSP.search.open");
   135       
   144       
   136 	} else {
   145 	} else {
   137       this._searchLastValue = this.selector.find(".LdtSearchInput").attr('value');
   146       this._searchLastValue = this.selector.find(".LdtSearchInput").attr('value');
   138       this.selector.find(".LdtSearchInput").attr('value','');
   147       this.selector.find(".LdtSearchInput").attr('value','');
   139       this.selector.find(".ui-icon-search").css("background-position","-160px -112px");
       
   140       this.selector.find(".LdtSearch").hide(100);
   148       this.selector.find(".LdtSearch").hide(100);
   141       
   149       
   142       // unbind the watcher event.
   150       // unbind the watcher event.
   143       this.selector.find(".LdtSearchInput").unbind('keypress set');
   151       this.selector.find(".LdtSearchInput").unbind('keypress set');
   144       this._searchBlockOpen = false;
   152       this._searchBlockOpen = false;