parameters: (self, item_div, dirname, basename)
docstring: item_div.add_behavior( {
          'type': 'click_up',
          'dirname': dirname,
          'basename': basename,
          'cbjs_action': '''
          var top = bvr.src_el.getParent(".spt_repo_browser_top");
          var content = top.getElement(".spt_repo_browser_content");
          var class_name = "tactic.ui.tools.repo_browser_wdg.RepoBrowserContentWdg";
          var kwargs = {
            dirname: bvr.dirname,
            basename: bvr.basename
          };
          spt.panel.load(content, class_name, kwargs);
          '''
          } )
docstring_summary: item_div.add_behavior( {
          'type': 'click_up',
          'dirname': dirname,
          'basename': basename,
          'cbjs_action': '''
          var top = bvr.src_el.getParent(".spt_repo_browser_top");
          var content = top.getElement(".spt_repo_browser_content");
          var class_name = "tactic.ui.tools.repo_browser_wdg.RepoBrowserContentWdg";
          var kwargs = {
            dirname: bvr.dirname,
            basename: bvr.basename
          };
          spt.panel.load(content, class_name, kwargs);
          '''
          } )
docstring_tokens: item_div . add_behavior ( { type : click_up dirname : dirname basename : basename cbjs_action : var top = bvr . src_el . getParent ( . spt_repo_browser_top ) ; var content = top . getElement ( . spt_repo_browser_content ) ; var class_name = tactic . ui . tools . repo_browser_wdg . RepoBrowserContentWdg ; var kwargs = { dirname : bvr . dirname basename : bvr . basename } ; spt . panel . load ( content class_name kwargs ) ; } )
function: def add_file_behaviors(self, item_div, dirname, basename):
          """
          item_div.add_behavior( {
          'type': 'click_up',
          'dirname': dirname,
          'basename': basename,
          'cbjs_action': '''
          var top = bvr.src_el.getParent(".spt_repo_browser_top");
          var content = top.getElement(".spt_repo_browser_content");
          var class_name = "tactic.ui.tools.repo_browser_wdg.RepoBrowserContentWdg";
          var kwargs = {
            dirname: bvr.dirname,
            basename: bvr.basename
          };
          spt.panel.load(content, class_name, kwargs);
          '''
          } )
          """
  
          # convert this to a repo directory
          asset_dir = Environment.get_asset_dir()
  
  
          # FIXME: not sure how general this
          webdirname = "/assets/%s" % dirname.replace(asset_dir, "")
  
          item_div.add_behavior( {
          'type': 'click_up',
          'webdirname': webdirname,
          'basename': basename,
          'cbjs_action': '''
          window.open(bvr.webdirname + "/" + bvr.basename, '_blank');
          '''
          } )
function_tokens: def add_file_behaviors ( self , item_div , dirname , basename ) : # convert this to a repo directory asset_dir = Environment . get_asset_dir ( ) # FIXME: not sure how general this webdirname = "/assets/%s" % dirname . replace ( asset_dir , "" ) item_div . add_behavior ( { 'type' : 'click_up' , 'webdirname' : webdirname , 'basename' : basename , 'cbjs_action' : '''
          window.open(bvr.webdirname + "/" + bvr.basename, '_blank');
          ''' } )