diff options
author | Marc Delisle <marc@infomarc.info> | 2007-01-22 20:53:54 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2007-01-22 20:53:54 +0300 |
commit | ba3477f5d31ecefde8e7c12e05165e6e9e02a233 (patch) | |
tree | a6cf6fa9ef45d488c3f8835a327f960894c0cd8e | |
parent | a52300c24ff7e3f99736d0a58542d5bdcfa36c4e (diff) |
button for direct/angular links
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | pmd/images/ang_direct.png | bin | 0 -> 795 bytes | |||
-rw-r--r-- | pmd/scripts/move.js | 29 | ||||
-rw-r--r-- | pmd/styles/default/style1.css | 56 | ||||
-rw-r--r-- | pmd_general.php | 12 |
5 files changed, 52 insertions, 48 deletions
@@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog $Id$ $HeadURL$ +2007-01-22 Marc Delisle <lem9@users.sourceforge.net> + * pmd/*: button for direct/angular links, thanks to Ivan Kirillov + 2007-01-22 Michal Čihař <michal@cihar.com> * lang/czech: Updated. diff --git a/pmd/images/ang_direct.png b/pmd/images/ang_direct.png Binary files differnew file mode 100644 index 0000000000..588037f43e --- /dev/null +++ b/pmd/images/ang_direct.png diff --git a/pmd/scripts/move.js b/pmd/scripts/move.js index 7ba4869caf..f22d29fee9 100644 --- a/pmd/scripts/move.js +++ b/pmd/scripts/move.js @@ -12,6 +12,7 @@ var s_right = 0; var ON_relation = 0; var ON_grid = 0; var ON_display_field = 0; +var ON_angular_direct = 0;// relation_style: 0 - angular 1 - direct var click_field = 0; var link_relation = ""; var id_hint; @@ -21,7 +22,6 @@ var osn_tab_width = 0; var osn_tab_height = 0; var height_field = 7; var Glob_X, Glob_Y; -var relation_style = 0; // relation_style: 0 - angular 1 - direct var timeoutID; var layer_menu_cur_click = 0; var step = 10; @@ -251,7 +251,7 @@ function Line(x1,y1,x2,y2,color_line) function Line0(x1,y1,x2,y2,color_line) { - if(relation_style*1) + if(ON_angular_direct) Line2(x1,y1,x2,y2,color_line); else Line3(x1,y1,x2,y2,color_line); @@ -377,8 +377,7 @@ function Save2() function Grid() { - if(!ON_grid ) - { + if(!ON_grid ) { ON_grid = 1; document.getElementById('grid_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA @@ -386,12 +385,28 @@ function Grid() document.getElementById('grid_button').className = 'M_butt_Selected_down_IE'; } } - else - { + else { document.getElementById('grid_button').className = 'M_butt'; ON_grid = 0; } } + +function Angular_direct() +{ + if(!ON_angular_direct ) { + ON_angular_direct = 1; + document.getElementById('angular_direct_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA + + if(isIE) { // correct for IE + document.getElementById('angular_direct_button').className = 'M_butt_Selected_down_IE'; + } + } + else { + ON_angular_direct = 0; + document.getElementById('angular_direct_button').className = 'M_butt'; + } + Re_load(); +} //+++++++++++++++++++++++++++++++++++++++++++++++++++++ RELATION ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function Start_relation() { @@ -766,7 +781,7 @@ function Top_menu_right(id_this) { if(id_this.alt==">") { - document.getElementById('top_menu').style.marginLeft = 300; + document.getElementById('top_menu').style.marginLeft = document.getElementById('top_menu').offsetWidth; // = 350 id_this.alt = "<"; id_this.src="pmd/images/2leftarrow_m.png"; } diff --git a/pmd/styles/default/style1.css b/pmd/styles/default/style1.css index 17d1ff6f54..be80967807 100644 --- a/pmd/styles/default/style1.css +++ b/pmd/styles/default/style1.css @@ -1,10 +1,7 @@ /* $Id$ */ body{ font-family:Arial, Helvetica, sans-serif; font-size:12px; background-color:#EAEEF0; margin:0px; } -/*.left_panel{ background-color:#EAEEF0; background-image:url(images/left_panel_tab.png); background-repeat:repeat-y; }*/ .input_tab { background-color:#A6C7E1;} -/*-------------------------------------------------------------*/ -/*.general_body { background-image:url(images/top_panel.png); background-position:top; background-repeat:repeat-x; }*/ table { font-size:12px; } #canvas { background-color:#FFFFFF; } @@ -16,15 +13,10 @@ canvas *{behavior:url(#default#VML)} .tab { -moz-user-select: none; background:#FFFFFF; border-collapse: collapse; border: 1px solid #AAAAAA; font-family:Tahoma; font-size:10px; z-index:1; } .tab_zag { background-image:url(images/Header.png); background-repeat:repeat-x; text-align:center; cursor:move; padding:1px; font-weight:bold; } .tab_zag_2 { background-image:url(images/Header_Linked.png); background-repeat:repeat-x; text-align:center; cursor:move; padding:1px; font-weight:bold; } -/*.tab_zag_3 { background-color:#FF0000; background-repeat:repeat-x; text-align:center; cursor:move; padding:1px; font-weight:bold; }*/ .tab_field { background:#FFFFFF; cursor:default; } .tab_field_2 { background-color:#CCFFCC; background-repeat:repeat-x; cursor:default;} .tab_field_3 { background-color:#FFE6E6;/*#DDEEFF*/ cursor:default; } #hint{ white-space:nowrap; position:absolute; background:#99FF99; left: 200px; top: 50px; z-index:3; border:#00CC66 solid 1px; visibility:hidden;} -/* -.L_butt,.L_butt:visited { font-size:12px; padding:4px; text-decoration: none; color:#000000; vertical-align:middle; cursor:default;} -.L_butt:hover{ font-size:12px; padding:3px; border:#0099CC solid 1px; background:#FFEE99; text-decoration: none; color:#000000; cursor:default;} -*/ form{margin:0px;} @@ -61,7 +53,7 @@ input,select,textarea{ font-family:Arial, Helvetica, sans-serif; font-size:12px; #osn_tab { background-color:#FFFFFF; border:#A9A9A9 solid 1px;} ul.header { - width: 300px; + width: 350px; background-color: #EAEEF0; color: #000000; text-align: center; @@ -86,52 +78,52 @@ ul.header { /* Button CSS rules */ a.M_butt img, a.M_butt_Selected_down img { - width: 20px; - height: 20px; - cursor: default; - margin-top: 3px; - margin-left: 1px; - margin-bottom: 3px; +width: 20px; +height: 20px; +cursor: default; +margin-top: 3px; +margin-left: 1px; +margin-bottom: 3px; } a.M_butt img{ - border: 1px dotted #F0F0EE !important; +border: 1px dotted #F0F0EE !important; } a.M_butt_Selected_down img { - border: 1px solid #C0C0BB !important; - background-color: #99FF99; +border: 1px solid #C0C0BB !important; +background-color: #99FF99; } a.M_butt img:hover { - border: 1px solid #0099CC !important; - cursor: default; - background-color: #FFEE99; +border: 1px solid #0099CC !important; +cursor: default; +background-color: #FFEE99; } /* for IE */ * html a.M_butt img, a.M_butt_Selected_down_IE { - border: 0px !important; - margin-top: 4px; - margin-bottom: 1px; +border: 0px !important; +margin-top: 4px; +margin-bottom: 1px; } * html a.M_butt{ - /*border: 1px dotted #F0F0EE;*/ - border: 1px dotted #FFFFFF; - cursor: default; +/*border: 1px dotted #F0F0EE;*/ +border: 1px dotted #FFFFFF; +cursor: default; } a.M_butt_Selected_down_IE { - border: 1px solid #C0C0BB; - background-color: #99FF99; +border: 1px solid #C0C0BB; +background-color: #99FF99; } * html a.M_butt:hover { - border: 1px solid #0099CC; - cursor: default; - background-color: #FFEE99; +border: 1px solid #0099CC; +cursor: default; +background-color: #FFEE99; } .M_bord diff --git a/pmd_general.php b/pmd_general.php index 681be89e7a..342a7fbc99 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -68,9 +68,10 @@ echo $script_tabs . $script_contr . $script_display_field; href="javascript:Start_table_new();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strCreateTable ?>" src="pmd/images/table.png"></a><a href="javascript:Start_relation();" onMouseDown="return false;" class="M_butt" id="rel_button" target="_self"><img title="<?php echo $strCreateRelation ?>" src="pmd/images/relation.png"></a><a href="javascript:Start_display_field();" onMouseDown="return false;" class="M_butt" id="display_field_button" target="_self"><img title="<?php echo $strChangeDisplay ?>" src="pmd/images/display_field.png"></a><a - href="javascript:Grid();" onMouseDown="return false;" class="M_butt" id="grid_button" target="_self"><img title="<?php echo $strSnapToGrid ?>" src="pmd/images/grid.png"></a><a href="javascript:location.reload();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strReload; ?>" src="pmd/images/reload.png"></a><a href="javascript:Help();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strHelp; ?>" src="pmd/images/help.png"></a><img class="M_bord" src="pmd/images/bord.png"><a + href="javascript:Angular_direct();" onMouseDown="return false;" class="M_butt" id="angular_direct_button" target="_self"><img title="<?php echo $strAngularLinks.' / '.$strDirectLinks; ?>" src="pmd/images/ang_direct.png"></a><a + href="javascript:Grid();" onMouseDown="return false;" class="M_butt" id="grid_button" target="_self"><img title="<?php echo $strSnapToGrid ?>" src="pmd/images/grid.png"></a><img class="M_bord" src="pmd/images/bord.png"><a href="javascript:Small_tab_all(document.getElementById('key_SB_all'));" onMouseDown="return false;" class="M_butt" target="_self"><img id='key_SB_all' title="<?php echo $strSmallBigAll; ?>" alt="v" src="pmd/images/downarrow1.png" ></a><a href="javascript:Small_tab_invert();" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strToggleSmallBig; ?>" alt="key" src="pmd/images/bottom.png" ></a><img class="M_bord" src="pmd/images/bord.png"><a href="javascript:PDF_save();" onMouseDown="return false;" class="M_butt" target="_self"><img src="pmd/images/pdf.png" alt="key" width="20" height="20" title="<?php echo $strImportExportCoords; ?>"></a></td> @@ -88,14 +89,7 @@ echo $script_tabs . $script_contr . $script_display_field; <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="1px"> - <div align="center" style="padding-top:5px;"> - <select name="view_relation" style=" vertical-align:text-top;" id="view_relation" onChange="relation_style = this.value; Re_load();"> - <option value="0"><?php echo $strAngularLinks; ?></option> - <option value="1"><?php echo $strDirectLinks; ?></option> - </select> - </div> - <div align="center"> - </div> + <div align="center" style="padding-top:5px"> <a href="javascript:Hide_tab_all(document.getElementById('key_HS_all'));" onMouseDown="return false;" class="M_butt" target="_self"><img title="<?php echo $strHideShowAll; ?>" alt="v" src="pmd/images/downarrow1.png" id='key_HS_all' ></a><a |