<?xml version="1.0"?>
<!DOCTYPE window SYSTEM "chrome://transerver/locale/transerver.dtd">
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://transerver/skin/css/task.css" type="text/css"?>
<window id="wnd_addtask"
        title="&addTask.label.title;"
        maxheight="490px"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="WindowInit(window.arguments)" onunload="WindowUnInit()">     
     <script src="chrome://transerver/content/js/common.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/xmlwrap.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/httpd.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/xmlrpc_lib.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/domhelper.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/htmhelper.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/io.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/htmhelper.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/tasksettingcommon.js" type="application/x-javascript" />
     <script src="chrome://transerver/content/js/tasksettingex.js" type="application/x-javascript" />
      <popup id="filter_task_pop"  onpopuphidden="onExtPopHidden()">
     <vbox>
          <checkbox id="pop_check_all" label="&exts.popup.all;" oncommand="popAllChecked(this)"/>                   
          <separator class="groove"></separator>
          <grid>
               <columns>
                    <column/>
                    <column/>
                    <column/>
                    <column/>
               </columns>
               <rows id="filter_task_pop_rows">                   
                    <row align="center">
                         <checkbox label="avi" oncommand="popOtherChecked(this)"/>
                         <checkbox label="asf" oncommand="popOtherChecked(this)"/>
                         <checkbox label="wmv" oncommand="popOtherChecked(this)"/>
                         <checkbox label="mov" oncommand="popOtherChecked(this)"/>
                    </row>
                    <row align="center">
                         <checkbox label="mp4" oncommand="popOtherChecked(this)"/>
                         <checkbox label="ts" oncommand="popOtherChecked(this)"/>
                         <checkbox label="m4v" oncommand="popOtherChecked(this)"/>
                         <checkbox label="mkv" oncommand="popOtherChecked(this)"/>
                    </row>
                    <row align="center">
                         <checkbox label="flv" oncommand="popOtherChecked(this)"/>
                         <checkbox label="3gp" oncommand="popOtherChecked(this)"/>
                         <checkbox label="3g2" oncommand="popOtherChecked(this)"/>
                         <checkbox label="f4v" oncommand="popOtherChecked(this)"/>
                    </row>
                    <row align="center">
                         <checkbox label="ogm" oncommand="popOtherChecked(this)"/>
                         <checkbox label="rmvb" oncommand="popOtherChecked(this)"/>
                         <checkbox label="rm" oncommand="popOtherChecked(this)"/>
                         <checkbox label="qt" oncommand="popOtherChecked(this)"/>
                    </row>
                    <row align="center">
                         <checkbox label="vob" oncommand="popOtherChecked(this)"/>
                         <checkbox label="dat" oncommand="popOtherChecked(this)"/>
                         <checkbox label="mpg" oncommand="popOtherChecked(this)"/>
                         <checkbox label="mpe" oncommand="popOtherChecked(this)"/>
                    </row>
                    <separator class="groove"></separator>
                    <row align="center">
                         <checkbox label="wma" oncommand="popOtherChecked(this)"/>
                         <checkbox label="mp3" oncommand="popOtherChecked(this)"/>
                         <checkbox label="m4a" oncommand="popOtherChecked(this)"/>
                         <checkbox label="ogg" oncommand="popOtherChecked(this)"/>
                    </row>
                    <row align="center">
                         <checkbox label="wav" oncommand="popOtherChecked(this)"/>
                         <checkbox label="cda" oncommand="popOtherChecked(this)"/>
                         <checkbox label="ape" oncommand="popOtherChecked(this)"/>
                         <checkbox label="flac" oncommand="popOtherChecked(this)"/>
                    </row>
               </rows>
          </grid>
     </vbox>
    </popup>
    <vbox flex="1">
        <groupbox>
             <grid>
                  <columns>
                    <column/>
                    <column flex="1"/>
                    <column/>                                 
                  </columns>
                  <rows>
                    <row align="center">
                       <label id="input_name">&addTask.label.inputUrl;</label>
                       <textbox id="intput_url" flex="1"></textbox>
                       <label id="fix_input_url" style="display:none"></label>
                        <hbox id="intput_btn_task">
                              <button  label="&overall.label.browse;" onclick="OpenFile('intput_url')"></button>
                              <!--button label="&task.add.merge;" onclick="OpenMergeFile()"></button-->
                         </hbox>
                       <button id="intput_btn_folder" style="display:none" label="&overall.label.browse;" onclick="OpenDir('intput_url')"></button>
                    </row>
                    <row align="center" id="filter_row" style="display:none;">
                         <label>&addTask.label.filter;</label>
                         <textbox id="folder_filter" flex="1" value="*.*"  onclick="mouseClicked(event)"></textbox>
                    </row>
                    <row align="center">
                         <label>&addTask.label.destDir;</label>
                         <textbox id="dest_dir" flex="1"></textbox>
                         <button label="&overall.label.browse;" onclick="OpenDir('dest_dir')"></button>
                    </row>
                    <row align="center" style="display:none;">
                         <label>&addTask.label.tempDir;</label>
                         <textbox id="temp_dir" flex="1"></textbox>
                         <button label="&overall.label.browse;" onclick="OpenDir('temp_dir')"></button>
                    </row>
                    <row align="center" id="subtitle_row">
                         <label>&addTask.label.sub;</label>
                         <textbox id="sub_title" flex="1"></textbox>
                         <button label="&overall.label.browse;" onclick="OpenFile('sub_title')"></button>
                    </row>
                     <row align="center" id="outformat_row">                         
                       <label>&task.output.fileformat;</label>                         
                       <menulist id="outformat_menu" editable="true" value="$(SourceFileName)" disabled="true" onblur="menuFileFormatChangeInput(this)" oninput="inputStartTask()" oncommand="menuFileFormatChange(this)">
                            <menupopup>
                                 <menuitem label="$(SourceFileName)" value="$(SourceFileName)"></menuitem>
                              <menuitem label="$(SourceRelativeDir)\$(SourceFileName)" value="$(SourceRelativeDir)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(Year)\$(SourceFileName)" value="$(Year)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(Month)\$(SourceFileName)" value="$(Month)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(Day)\$(SourceFileName)" value="$(Day)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(Year)-$(Month)-$(Day)\$(SourceFileName)" value="$(Year)-$(Month)-$(Day)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(Year)\$(Month)\$(Day)\$(SourceFileName)" value="$(Year)\$(Month)\$(Day)\$(SourceFileName)"></menuitem>
                                 <menuitem label="$(DestExt)" value="$(DestExt)"></menuitem>
                                 <menuitem label="$(DestIndex)" value="$(DestIndex)"></menuitem>
                            </menupopup>
                       </menulist>
                       <checkbox id="outformat_check" label="&overall.label.enable;" checked="false" oncommand="checkFileFormat(this.checked)"/>
                     </row>
                  </rows>
             </grid>
          </groupbox>
        
        <hbox>
           <button label="&overall.label.add;" onclick="postToRpc()"></button>
           <button label="&overall.label.addClose;" onclick="postToRpc();closeWnd();"></button>
           <button label="&overall.label.cancel;" onclick="closeWnd()"></button>
        </hbox>
    </vbox>
</window>