diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /templates | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2 |
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'templates')
-rw-r--r-- | templates/editbookmark.tpl.php | 12 | ||||
-rw-r--r-- | templates/top.inc.php | 74 |
2 files changed, 53 insertions, 33 deletions
diff --git a/templates/editbookmark.tpl.php b/templates/editbookmark.tpl.php index b4c74ba..0b6899b 100644 --- a/templates/editbookmark.tpl.php +++ b/templates/editbookmark.tpl.php @@ -18,9 +18,9 @@ switch ($row['bStatus']) { ?> <script type="text/javascript"> -window.onload = function() { - document.getElementById("address").focus(); -} +//window.onload = function() { +// document.getElementById("address").focus(); +//} </script> <form action="<?php echo $formaction; ?>" method="post"> @@ -42,9 +42,13 @@ window.onload = function() { </tr> <tr> <th align="left"><?php echo T_('Tags'); ?></th> - <td><input type="text" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" /></td> + <td class="scuttletheme"> + <span dojoType="dojo.data.ItemFileReadStore" jsId="memberTagStore" url="<?php echo $GLOBALS['root']?>ajax/gettags.php"></span> + <input type="text" dojoType="dojox.widget.MultiComboBox" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" store="memberTagStore" delimiter="," searchAttr="tag" hasDownArrow="false"/></td> <td>← <?php echo T_('Comma-separated'); ?></td> </tr> + + <tr> <th></th> <td align="right"><small><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?><small></td> diff --git a/templates/top.inc.php b/templates/top.inc.php index b17c8f0..46698d0 100644 --- a/templates/top.inc.php +++ b/templates/top.inc.php @@ -2,51 +2,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> - <title><?php echo filter($GLOBALS['sitename'] . (isset($pagetitle) ? ': ' . $pagetitle : '')); ?></title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="icon" type="image/png" href="<?php echo $GLOBALS['root']; ?>icon.png" /> - <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['root']; ?>scuttle.css" /> - <?php - if(isset($rsschannels)) { +<title><?php echo filter($GLOBALS['sitename'] . (isset($pagetitle) ? ': ' . $pagetitle : '')); ?></title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<link rel="icon" type="image/png" + href="<?php echo $GLOBALS['root']; ?>icon.png" /> +<link rel="stylesheet" type="text/css" + href="<?php echo $GLOBALS['root']; ?>scuttle.css" /> +<?php +if(isset($rsschannels)) { $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { - echo '<link rel="alternate" type="application/rss+xml" title="'. $rsschannels[$i][0] .'" href="'. $rsschannels[$i][1] .'" />'; + echo '<link rel="alternate" type="application/rss+xml" title="'. $rsschannels[$i][0] .'" href="'. $rsschannels[$i][1] .'" />'; } - } - if (isset($loadjs)) { - echo '<script type="text/javascript" src="'. $GLOBALS['root'] .'jsScuttle.php"></script>'; - } - ?> +} +?> + +<?php if (isset($loadjs)) :?> + +<script type="text/javascript" + src="<?php echo $GLOBALS['root']; ?>jsScuttle.php"></script> + +<link rel="stylesheet" type="text/css" + href="<?php echo $GLOBALS['root']; ?>includes/js/dijit/themes/tundra/tundra.css"> + +<script type="text/javascript" src="<?php echo $GLOBALS['root']; ?>includes/js/dojo/dojo.js" + djConfig="parseOnLoad:true, isDebug:false, usePlainJson:true"></script> + +<script type="text/javascript"> +dojo.require("dojo.parser"); +dojo.require("dojo.data.ItemFileReadStore"); +dojo.require("dojox.widget.MultiComboBox"); +</script> +<?php endif ?> + </head> -<body> + +<body class="tundra"> <!-- the tundra class is used by Dojo widgets --> <?php $headerstyle = ''; if(isset($_GET['popup'])) { - $headerstyle = ' class="popup"'; + $headerstyle = ' class="popup"'; } ?> -<div id="header"<?php echo $headerstyle; ?>> - <h1><a href="<?php echo $GLOBALS['root']; ?>"><?php echo $GLOBALS['sitename']; ?></a></h1> - <?php - if(!isset($_GET['popup'])) { - $this->includeTemplate('toolbar.inc'); - } - ?> -<?php if(!isset($_GET['popup'])):?> -<!--span id="welcome"><?php echo $GLOBALS['welcomeMessage'];?></span--> -<?php endif; ?> -</div> +<div id="header" <?php echo $headerstyle; ?>> +<h1><a href="<?php echo $GLOBALS['root']; ?>"><?php echo $GLOBALS['sitename']; ?></a></h1> +<?php +if(!isset($_GET['popup'])) { + $this->includeTemplate('toolbar.inc'); +} +?> <?php if(!isset($_GET['popup'])):?> <!--span id="welcome"><?php echo $GLOBALS['welcomeMessage'];?></span--> +<?php endif; ?></div> <?php if (isset($subtitle)) { - echo '<h2>'. $subtitle ."</h2>\n"; + echo '<h2>'. $subtitle ."</h2>\n"; } if (isset($error)) { - echo '<p class="error">'. $error ."</p>\n"; + echo '<p class="error">'. $error ."</p>\n"; } if (isset($msg)) { - echo '<p class="success">'. $msg ."</p>\n"; + echo '<p class="success">'. $msg ."</p>\n"; } -?> +?>
\ No newline at end of file |