@@ -3,6 +3,7 @@ var link = (function(){
33var bind = function ( ) {
44sortable ( ".link-area" , {
55items : ".link-item" ,
6+ handle : ".link-control-item-handle" ,
67placeholder : helper . node ( "div|class:link-item-placeholder" )
78} ) ;
89sortable ( ".link-area" ) [ 0 ] . addEventListener ( "sortupdate" , function ( event ) {
@@ -85,6 +86,7 @@ var link = (function(){
8586control . dependents ( ) ;
8687control . render ( ) ;
8788resetStagedBookmarkData ( ) ;
89+ sortable ( ".link-area" ) ;
8890} ,
8991cancelAction : function ( ) {
9092resetStagedBookmarkData ( ) ;
@@ -137,6 +139,7 @@ var link = (function(){
137139render . tabIndex ( ) ;
138140_returnToPreviousFocusLink ( ) ;
139141resetStagedBookmarkData ( ) ;
142+ sortable ( ".link-area" ) ;
140143} ,
141144cancelAction : function ( ) {
142145_returnToPreviousFocusLink ( ) ;
@@ -162,6 +165,7 @@ var link = (function(){
162165control . dependents ( ) ;
163166control . render ( ) ;
164167_returnToPreviousFocusLink ( ) ;
168+ sortable ( ".link-area" ) ;
165169} ,
166170cancelAction : function ( ) {
167171_returnToPreviousFocusLink ( ) ;
@@ -417,14 +421,37 @@ var link = (function(){
417421value : "link-control"
418422} ]
419423} ) ;
424+ var linkHandle = helper . makeNode ( {
425+ tag : "button" ,
426+ attr : [ {
427+ key : "class" ,
428+ value : "button button-small link-control-item link-control-item-handle"
429+ } , {
430+ key : "tabindex" ,
431+ value : - 1
432+ } , {
433+ key : "title" ,
434+ value : "Drag and drop to reorder"
435+ } ]
436+ } ) ;
437+ var linkHandleIcon = helper . makeNode ( {
438+ tag : "span" ,
439+ attr : [ {
440+ key : "class" ,
441+ value : "button-icon icon-reorder"
442+ } ]
443+ } ) ;
420444var linkEdit = helper . makeNode ( {
421445tag : "button" ,
422446attr : [ {
423447key : "class" ,
424- value : "button button-small link-control-item"
448+ value : "button button-small link-control-item link-control-item-edit "
425449} , {
426450key : "tabindex" ,
427451value : - 1
452+ } , {
453+ key : "title" ,
454+ value : "Edit this bookmark"
428455} ]
429456} ) ;
430457var linkEditIcon = helper . makeNode ( {
@@ -438,10 +465,13 @@ var link = (function(){
438465tag : "button" ,
439466attr : [ {
440467key : "class" ,
441- value : "button button-small link-control-item"
468+ value : "button button-small link-control-item link-control-item-remove "
442469} , {
443470key : "tabindex" ,
444471value : - 1
472+ } , {
473+ key : "title" ,
474+ value : "Remove this bookmark"
445475} ]
446476} ) ;
447477var linkRemoveIcon = helper . makeNode ( {
@@ -458,9 +488,11 @@ var link = (function(){
458488} ;
459489linkPanelFront . appendChild ( linkDisplay ) ;
460490linkPanelFront . appendChild ( linkName ) ;
491+ linkHandle . appendChild ( linkHandleIcon ) ;
492+ linkControl . appendChild ( linkHandle ) ;
461493linkEdit . appendChild ( linkEditIcon ) ;
462- linkRemove . appendChild ( linkRemoveIcon ) ;
463494linkControl . appendChild ( linkEdit ) ;
495+ linkRemove . appendChild ( linkRemoveIcon ) ;
464496linkControl . appendChild ( linkRemove ) ;
465497linkUrl . appendChild ( linkUrlText ) ;
466498linkPanelBack . appendChild ( linkUrl ) ;
0 commit comments