Revision 5c4713f8 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js | ||
---|---|---|
265 | 265 |
} |
266 | 266 |
} |
267 | 267 |
|
268 |
|
|
268 |
function goToByScroll(id){ |
|
269 |
// Remove "link" from the ID |
|
270 |
id = id.replace("link", ""); |
|
271 |
// Scroll |
|
272 |
$('html,body').animate({ |
|
273 |
scrollTop: $("#"+id).offset().top}, |
|
274 |
'slow'); |
|
275 |
} |
|
269 | 276 |
$(document).ready(function(){ |
270 | 277 |
|
271 | 278 |
ui.setSidebarHeight(); |
... | ... | |
400 | 407 |
}) |
401 | 408 |
|
402 | 409 |
$('#picker').farbtastic('#color'); |
410 |
$('.show-add-tag').click(function(e){ |
|
411 |
e.preventDefault(); |
|
412 |
$(this).parents('.tags-area').find('.snf-color-picker').slideDown(); |
|
413 |
goToByScroll('hide-add-tag'); |
|
414 |
}) |
|
415 |
$('.hide-add-tag').click(function(e){ |
|
416 |
e.preventDefault(); |
|
417 |
$(this).parents('.snf-color-picker').slideUp(); |
|
418 |
}) |
|
403 | 419 |
|
404 | 420 |
}) |
405 | 421 |
|
Also available in: Unified diff