0
Route::current()->remove("tag/(name)/");
0
+ public function admin_head() {
0
+ <script type="text/javascript">
0
+ $(".tags_select a").each(function(){
0
+ regexp = new RegExp("(, ?|^)"+ $(this).text() +"(, ?|$)", "g")
0
+ if ($("#tags").val().match(regexp))
0
+ $(this).addClass("tag_added")
0
+ $(this).removeClass("tag_added")
0
+ $("#tags").livequery("keyup", scanTags)
0
+ function add_tag(name, link) {
0
+ if ($("#tags").val().match("(, |^)"+ name +"(, |$)")) {
0
+ regexp = new RegExp("(, |^)"+ name +"(, |$)", "g")
0
+ $("#tags").val($("#tags").val().replace(regexp, function(match, before, after){
0
+ if (before == ", " && after == ", ")
0
+ $(link).removeClass("tag_added")
0
+ if ($("#tags").val() == "")
0
+ $("#tags").val($("#tags").val() + ", "+ name)
0
+ $(link).addClass("tag_added")
0
+ <style type="text/css" media="screen">
0
+ display: inline-block;
0
+ border: .1em solid #DDDDA8;
0
+ text-decoration: none;
0
+ .tags_select a.tag_added {
0
+ border-top-width: .1em;
0
+ border-left-width: .1em;
0
public function new_post_options() {
0
+ $tags = self::list_tags();
0
<label for="tags"><?php echo __("Tags", "tags"); ?> <span class="sub"><?php echo __("(comma separated)", "tags"); ?></span></label>
0
<input class="text" type="text" name="tags" value="" id="tags" />
0
+ <span class="tags_select">
0
+<?php foreach ($tags as $tag): ?>
0
+ <a href="javascript:add_tag('<?php echo addslashes($tag["name"]); ?>', '.tag_<?php echo addslashes($tag["url"]); ?>')" class="tag_<?php echo $tag["url"]; ?>"><?php echo $tag["name"]; ?></a>
0
public function edit_post_options($post) {
0
+ $tags = self::list_tags();
0
<label for="tags"><?php echo __("Tags", "tags"); ?> <span class="sub"><?php echo __("(comma separated)", "tags"); ?></span></label>
0
<input class="text" type="text" name="tags" value="<?php echo implode(", ", self::unlinked_tags($post->unclean_tags)) ?>" id="tags" />
0
+ <span class="tags_select">
0
+<?php foreach ($tags as $tag): ?>
0
+ <a href="javascript:add_tag('<?php echo addslashes($tag["name"]); ?>', '.tag_<?php echo addslashes($tag["url"]); ?>')" class="tag_<?php echo $tag["url"]; ?>"><?php echo $tag["name"]; ?></a>