]> git.quilime.com - clmpr.git/commitdiff
Cleaned tags to be minimal
authorGabriel Dunne <gdunne@quilime.com>
Mon, 26 Dec 2011 22:37:24 +0000 (14:37 -0800)
committerGabriel Dunne <gdunne@quilime.com>
Mon, 26 Dec 2011 22:37:24 +0000 (14:37 -0800)
about.html
data.php
edit.php
new.php

index fc578a165964533e0a0cf38cc92f2d4d43a1019c..69b23771820d309ff19fcc162a0b2638d045446e 100644 (file)
@@ -16,11 +16,11 @@ use clmpr (<b>/klum-per/</b>) to save bookmarks.
 drag this link [<a href="javascript:<?=$js?>">+</a>] to your bookmark bar
 <br />
 <br />
-</p>     
+</p>
 
 <p>
 project keywords: <i>
-bookmarks, 
+bookmarks,
 delicious-clone.
 webservice,
 database,
@@ -39,4 +39,4 @@ clmpr is open source. fork the project on <a href="http://github.com/quilime/clm
 
 
 <!-- echo '&copy; 2011 <a href="http://quilime.com">gabriel dunne</a>'; -->
-<hr />
\ No newline at end of file
+<hr />
index 0425bc4f0df70cdd6361c0f058436d543f866dc8..dd17d8335b94e4314edff47065c13c35da47733c 100644 (file)
--- a/data.php
+++ b/data.php
@@ -45,7 +45,7 @@ function tag_string_to_array($tagstr) {
     if (strpos($tagstr, ',')) {
         $tags = explode(',', $tagstr);
     } else {
-        # match all quoted strings
+        # match anything inside a pair of quotes
         preg_match_all('/"(.*?)"/', $tagstr, $quoted_tags);
         # strip quoted strings from tag string
         $tagstr_noquotes = str_replace($quoted_tags[0], '', $tagstr);
index 037b4a318eb26717be1f2a1e1a341226043c7d39..f07a916a8fcaedf2df62f396ca7b45ce5eaae1c9 100644 (file)
--- a/edit.php
+++ b/edit.php
@@ -61,16 +61,16 @@ function deleteClump( id ) {
     <input type="text" tabindex="2" name="url" value="<?php echo $clump['url']; ?>">
     </p>
 
+    <p>
+    <label>description</label>
+    <textarea type="text" tabindex="4" name="description"><?php echo htmlentities($clump['description']); ?></textarea>
+    </p>
+
     <p>
     <label>tags</label>
     <input type="text" tabindex="3" name="tags" value="<?php echo htmlentities($clump['tags']); ?>">
     <p>
 
-    <p>
-    <label>description</label>
-    <input type="text" tabindex="4" name="description" value="<?php echo htmlentities($clump['description']); ?>">
-    </p>
-
     <p>
         <span class="meta" title="<?php echo date('r', strtotime($clump['date'])); ?>">
             saved <?php echo approximate_time(date('U') - strtotime($clump['date'])) ?> ago</a> by
diff --git a/new.php b/new.php
index 203ebad85bc088e1ee541edc4db1530ea3ac239b..6bc42db00170f64f1a307686f3393181909444db 100644 (file)
--- a/new.php
+++ b/new.php
@@ -12,6 +12,11 @@ try {
     ?>
     <!DOCTYPE html><head>
        <?php include 'head.html'; ?>
+    <script>
+    $(document).ready(function() {
+        $('#tag-input')[0].focus();
+    });
+    </script>
     </head><body>
     <?php
 
@@ -32,13 +37,13 @@ try {
             </p>
 
             <p>
-               <label>tags <span class="ui">(combine "multiple words" with quotes)</span></label>
-               <input type="text" id="tag-input" name="tags" tabindex="3" value="">
+            <label>description</label>
+            <textarea name="description" tabindex="3"></textarea>
             </p>
 
             <p>
-            <label>description</label>
-            <input type="text" name="description" tabindex="4" value="">
+               <label>tags</label>
+               <input type="text" id="tag-input" name="tags" tabindex="4" value="">
             </p>
 
                <br />