def get_title(my): mode = my.get_option("mode") if mode == "input": return "Input" widget = Widget() float_menu = WebContainer.get_float_menu() icon = float_menu.get_icon() widget.add(SpanWdg(icon, css='small')) #widget.add(super(AssetLoaderWdg,my).get_title()) my.shot = ProdContext.get_shot() load_button = ProdIconButtonWdg("Load", long=True) load_button.set_id(my.LOAD_BUTTON_ID) prefix = my.PREFIX load_button.add_behavior({"type": "click_up", \ "cbjs_action": "setTimeout(function() { load_selected_snapshots_cbk('%s', '%s', bvr)}, 200)" \ % (prefix, my.CB_NAME) }) widget.add(load_button) update_button = ProdIconButtonWdg("Update", long=True) update_button.add_event("onclick", "setTimeout(function() {py_replace_reference('%s','%s')}, 200)" % \ (prefix, my.CB_NAME)) widget.add(update_button) # get the session my.session = SessionContents.get() return widget
def get_title(my): mode = my.get_option("mode") if mode == "input": return "Input" widget = SpanWdg() #widget.add(super(AssetLoaderWdg,my).get_title()) widget.set_attr("nowrap", "1") load_button = ProdIconButtonWdg("Load Shot") load_button.set_id(my.LOAD_BUTTON_ID) prefix = my.PREFIX load_button.add_behavior( {'type': "click_up", "cbjs_action": "setTimeout(function() {load_selected_snapshots_cbk('%s', '%s', bvr)}, 200) " \ % (prefix, my.CB_NAME) \ }) widget.add(load_button) #multiplier = HiddenWdg() #multiplier.set_id("load_multiplier") #multiplier.set_value("1") #widget.add( multiplier ) # xsi doesn't reference shot in now if WebContainer.get_web().get_selected_app() != 'XSI': update_button = ProdIconButtonWdg("Update", long=True) prefix = my.PREFIX update_button.add_event("onclick", "setTimeout( function() {py_replace_reference('%s','%s')}, 200)" % \ (prefix, my.CB_NAME)) widget.add(update_button) # Get the session. This overrides what is run in preprocess() my.session = SessionContents.get(asset_mode=True) return widget