First attempt to integrate designer into rest

For now works only in pmahomme and needs lot of cleanups and fixes
This commit is contained in:
Michal Čihař 2011-08-19 12:50:28 +02:00
parent cd69e5bdf2
commit 98e71f8805
2 changed files with 552 additions and 19 deletions

View File

@ -8,6 +8,8 @@
*
*/
require_once './libraries/pmd_common.php';
require './libraries/db_common.inc.php';
require './libraries/db_info.inc.php';
$tab_column = get_tab_info();
$script_tabs = get_script_tabs();
@ -17,17 +19,6 @@ $tables_pk_or_unique_keys = get_pk_or_unique_keys();
$tables_all_keys = get_all_keys();
$hidden = "hidden";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="pmd/images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="pmd/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="pmd/styles/<?php echo $GLOBALS['PMD']['STYLE'] ?>/style1.css" />
<title>Designer</title>
<?php
$params = array('lang' => $GLOBALS['lang']);
if (isset($GLOBALS['db'])) {
$params['db'] = $GLOBALS['db'];
@ -125,10 +116,6 @@ echo $script_tabs . $script_contr . $script_display_field;
title="<?php echo __('Move Menu'); ?>" /></a>
</div>
<div id="osn_tab">
<CANVAS id="canvas" width="100" height="100" onclick="Canvas_click(this)"></CANVAS>
</div>
<form action="" method="post" name="form1">
<div id="layer_menu" style="visibility:<?php echo $hidden ?>;">
<div align="center" style="padding-top:5px;">
@ -166,8 +153,8 @@ for ($i = 0; $i < $name_cnt; $i++) {
echo 'checked="checked"';
}
?> /></td>
<td class="Tabs" onmouseover="this.className='Tabs2'"
onmouseout="this.className='Tabs'"
<td class="pmd_Tabs" onmouseover="this.className='pmd_Tabs2'"
onmouseout="this.className='pmd_Tabs'"
onclick="Select_tab('<?php echo $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>');">
<?php echo $GLOBALS['PMD_OUT']["TABLE_NAME"][$i]; ?></td>
</tr>
@ -185,6 +172,11 @@ for ($i = 0; $i < $name_cnt; $i++) {
</div>
</div>
</div>
<div id="osn_tab">
<canvas class="pmd" id="canvas" width="100" height="100" onclick="Canvas_click(this)"></canvas>
</div>
<?php
for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
$t_n = $GLOBALS['PMD']["TABLE_NAME"][$i];
@ -196,7 +188,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
<input name="t_v[<?php echo $t_n_url ?>]" type="hidden" id="t_v_<?php echo $t_n_url ?>_" />
<input name="t_h[<?php echo $t_n_url ?>]" type="hidden" id="t_h_<?php echo $t_n_url ?>_" />
<table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="tab"
<table id="<?php echo $t_n_url ?>" cellpadding="0" cellspacing="0" class="pmd_tab"
style="position: absolute;
left: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["X"]; else echo rand(180, 800); ?>px;
top: <?php if (isset($tab_pos[$t_n])) echo $tab_pos[$t_n]["Y"]; else echo rand(30, 500); ?>px;
@ -332,7 +324,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
}
?>
</form>
<div id="hint"></div>
<div id="pmd_hint"></div>
<div id='layer_action' style="visibility:<?php echo $hidden ?>;">Load...</div>
<table id="layer_new_relation" style="visibility:<?php echo $hidden ?>;"

View File

@ -3019,3 +3019,544 @@ span.cm-number {
.ui-timepicker-div dl dt{ height: 25px; }
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
/* Designer */
.input_tab {
background-color: #A6C7E1;
color: #000000;
}
#canvas {
background-color: #FFFFFF;
color: #000000;
}
canvas.pmd {
display: inline-block;
overflow: hidden;
text-align: left;
}
canvas.pmd * {
behavior: url(#default#VML);
}
.pmd_tab {
background-color: #FFFFFF;
color: #000000;
border-collapse: collapse;
border: 1px solid #AAAAAA;
font-family: Tahoma, sans-serif;
font-size: 10px;
z-index: 1;
-moz-user-select: none;
}
.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_field {
background: #FFFFFF;
color: #000000;
cursor: default;
}
.tab_field_2 {
background-color: #CCFFCC;
color: #000000;
background-repeat: repeat-x;
cursor: default;
}
.tab_field_3 {
background-color: #FFE6E6; /*#DDEEFF*/
color: #000000;
cursor: default;
}
#pmd_hint {
white-space: nowrap;
position: absolute;
background-color: #99FF99;
color: #000000;
left: 200px;
top: 50px;
z-index: 3;
border: #00CC66 solid 1px;
visibility: hidden;
}
.scroll_tab {
overflow: auto;
width: 100%;
height: 500px;
}
.pmd_Tabs {
cursor: default;
font-family: Tahoma, sans-serif;
font-size: 10px;
color: #0055bb;
white-space: nowrap;
text-decoration: none;
text-indent: 3px;
font-weight: bold;
margin-left: 2px;
text-align: left;
background-color: #FFFFFF;
background-image: url(images/left_panel_butt.png);
border: #CCCCCC solid 1px;
}
.pmd_Tabs2 {
cursor: default;
font-family: Tahoma, sans-serif;
font-size: 10px;
color: #0055bb;
background: #FFEE99;
text-indent: 3px;
font-weight: bold;
white-space: nowrap;
text-decoration: none;
border: #9999FF solid 1px;
text-align: left;
}
.owner {
font-family: Tahoma, sans-serif;
font-size: 9px;
font-weight: normal;
/* background-color: #ffffff;*/
color: #888888;
}
.option_tab {
padding-left: 2px;
padding-right: 2px;
width: 5px;
}
.select_all {
vertical-align: top;
padding-left: 2px;
padding-right: 2px;
cursor: default;
width: 1px;
color: #000000;
background-image: url(images/Header.png);
background-repeat: repeat-x;
}
.small_tab {
vertical-align: top;
background-color: #0064ea;
color: #FFFFFF;
background-image: url(images/small_tab.png);
cursor: default;
text-align: center;
font-weight: bold;
padding-left: 2px;
padding-right: 2px;
width: 1px;
text-decoration: none;
}
.small_tab2 {
vertical-align: top;
color: #FFFFFF;
background-color: #FF9966;
cursor: default;
padding-left: 2px;
padding-right: 2px;
text-align: center;
font-weight: bold;
width: 1px;
text-decoration: none;
}
.small_tab_pref {
background-image: url(images/Header.png);
background-repeat: repeat-x;
text-align: center;
width: 1px;
}
.small_tab_pref2 {
vertical-align: top;
color: #FFFFFF;
background-color: #FF9966;
cursor: default;
text-align: center;
font-weight: bold;
width: 1px;
text-decoration: none;
}
.butt {
border: #4477aa solid 1px;
font-size: 11px;
font-weight: bold;
height: 19px;
width: 70px;
background-color: #FFFFFF;
color: #000000;
vertical-align: baseline;
}
.L_butt2_1 {
font-size: 12px;
padding: 1px;
text-decoration: none;
background-color: #ffffff;
color: #000000;
vertical-align: middle;
cursor: default;
}
.L_butt2_2 {
font-size: 12px;
padding: 0;
border: #0099CC solid 1px;
background: #FFEE99;
text-decoration: none;
color: #000000;
cursor: default;
}
/* ---------------------------------------------------------------------------*/
.bor {
width: 10px;
height: 10px;
}
.frams1 {
background: url(images/1.png) no-repeat right bottom;
}
.frams2 {
background: url(images/2.png) no-repeat left bottom;
}
.frams3 {
background: url(images/3.png) no-repeat left top;
}
.frams4 {
background: url(images/4.png) no-repeat right top;
}
.frams5 {
background: url(images/5.png) repeat-x center bottom;
}
.frams6 {
background: url(images/6.png) repeat-y left;
}
.frams7 {
background: url(images/7.png) repeat-x top;
}
.frams8 {
background: url(images/8.png) repeat-y right;
}
#osn_tab {
background-color: #FFFFFF;
color: #000000;
border: #A9A9A9 solid 1px;
}
.header {
background-color: #EAEEF0;
color: #000000;
text-align: center;
font-weight: bold;
margin: 0;
padding: 0;
background-image: url(images/top_panel.png);
background-position: top;
background-repeat: repeat-x;
border-right: #999999 solid 1px;
border-left: #999999 solid 1px;
height: 28px;
}
.header a {
display: block;
float: left;
margin: 3px 1px 4px 1px;
height: 20px;
border: 1px dotted #ffffff;
}
.header .M_bord {
display: block;
float: left;
margin: 4px;
height: 20px;
width: 2px;
}
.header a.first {
margin-right: 1em;
}
.header a.last {
margin-left: 1em;
}
a.M_butt_Selected_down_IE,
a.M_butt_Selected_down {
border: 1px solid #C0C0BB;
background-color: #99FF99;
color: #000000;
}
a.M_butt_Selected_down_IE:hover,
a.M_butt_Selected_down:hover,
a.M_butt:hover {
border: 1px solid #0099CC;
background-color: #FFEE99;
color: #000000;
}
#layer_menu {
clear: both;
float: left;
z-index: 1000;
background-color: #EAEEF0;
border: #999999 solid 1px;
}
#layer_action {
position: absolute;
left: 638px;
top: 52px;
z-index: 1000;
background-color: #CCFF99;
padding: 3px;
border: #009933 solid 1px;
white-space: nowrap;
font-weight: bold;
}
#layer_upd_relation {
position: absolute;
left: 637px;
top: 224px;
z-index: 1000;
}
#layer_new_relation {
position: absolute;
left: 636px;
top: 85px;
z-index: 1000;
width: 153px;
}
#pmd_optionse {
position: absolute;
left: 636px;
top: 85px;
z-index: 1000;
width: 153px;
}
#layer_menu_sizer {
background-image: url(../../images/resize.png);
cursor: nw-resize;
width: 16px;
height: 16px;
}
.panel {
position: fixed;
top: 50px;
right: 0;
display: none;
background: #FFF;
border:1px solid #F5F5F5;
width: 350 px;
height: auto;
padding: 30px 170px 30px 30px;
color:#FFF;
z-index:99;
}
a.trigger{
position: fixed;
text-decoration: none;
top: 60px; right: 0;
font-size: 16px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 10px 40px 10px 15px;
font-weight: 700;
background:#333333 url(images/plus.png) 85% 55% no-repeat;
border:1px solid #444444;
display: block;
}
a.trigger:hover{
position: fixed;
text-decoration: none;
top: 60px; right: 0;
font-size: 16px;
font-family: verdana, helvetica, arial, sans-serif;
color:#080808;
padding: 10px 40px 10px 15px;
font-weight: 700;
background:#fff696 url(images/plus.png) 85% 55% no-repeat;
border:1px solid #999;
display: block;
}
a.active.trigger {
background:#222222 url(images/minus.png) 85% 55% no-repeat;
z-index:999;
}
a.active.trigger:hover {
background:#fff696 url(images/minus.png) 85% 55% no-repeat;
z-index:999;
}
h2.tiger{
background-repeat: repeat-x;
padding: 1px;
font-weight: bold;
font-size:14px;
padding: 50 20 50 20px;
margin: 0 0 5px 0;
width: 250px;
float: left;
color : #333;
text-align: center;
}
h2.tiger a {
background-image: url(images/Header.png);
text-align: center;
text-decoration: none;
color : #333;
display: block;
}
h2.tiger a:hover {
color: #000;
background-image: url(images/Header_Linked.png);
}
h2.active {
background-image: url(images/Header.png);
background-repeat: repeat-x;
padding: 1px;
background-position: left bottom;
}
.toggle_container {
margin: 0 0 5px;
padding: 0;
border-top: 1px solid #d6d6d6;
background: #FFF ;
width: 250px;
overflow: hidden;
font-size: 1.2em;
clear: both;
}
.toggle_container .block {
background-color: #DBE4E8;
padding:40 15 40 15px; /*--Padding of Container--*/
border:1px solid #999;
color:#000;
}
.history_table {
text-align: center;
background-color: #9999CC;
}
.history_table2 {
text-align: center;
background-color: #DBE4E8;
}
#filter {
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: #CCA;
z-index:10;
opacity:0.5;
filter: alpha(opacity=50);
}
#box {
display: none;
position: absolute;
top: 20%;
left: 30%;
width: 500px;
height: 220px;
padding: 48px;
margin:0;
border: 1px solid black;
background-color: white;
z-index:101;
overflow: visible;
}
#boxtitle {
position:absolute;
float:center;
top:0;
left:0;
width:593px;
height:20px;
padding:0;
padding-top:4px;
left-padding:8px;
margin:0;
border-bottom:4px solid #3CF;
background-color: #D0DCE0; //#09c;
color:black;
font-weight:bold;
padding-left: 2px;
font-family:"Times New Roman", Times, serif;
font-size:16px;
text-align:left;
}
#tblfooter {
background-color: D3DCE3;
float: right;
padding-top:10px;
color: black;
font-weight: normal;
}
input.btn {
color:#333;
background-color: #D0DCE0;
}