|
|
@@ -20,8 +20,8 @@ $(document).ready(function() {
|
|
|
var $panelRight = $('.panel-right');
|
|
|
var $panelWrap = $('.panel-container');
|
|
|
var $tabItems = $('#tabs li');
|
|
|
- var $detailsRepo = $('details-repo');
|
|
|
- var $detailsExmp = $('details-example');
|
|
|
+ var $detailsRepo = $('#details-repo');
|
|
|
+ var $detailsExmp = $('#details-example');
|
|
|
var $window = $(window);
|
|
|
var activeMode = 'html';
|
|
|
var currentHash;
|
|
|
@@ -247,18 +247,18 @@ $(document).ready(function() {
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
- // function notify(type, text) {
|
|
|
- // $notification
|
|
|
- // .addClass(type)
|
|
|
- // .addClass('active');
|
|
|
- // $notification.html(text);
|
|
|
- // setTimeout(function() {
|
|
|
- // $notification.removeClass('active');
|
|
|
- // }, 2000);
|
|
|
- // setTimeout(function() {
|
|
|
- // $notification.removeClass(type);
|
|
|
- // }, 3000);
|
|
|
- // }
|
|
|
+ function notify(type, text) {
|
|
|
+ $notification
|
|
|
+ .addClass(type)
|
|
|
+ .addClass('active');
|
|
|
+ $notification.html(text);
|
|
|
+ setTimeout(function() {
|
|
|
+ $notification.removeClass('active');
|
|
|
+ }, 2000);
|
|
|
+ setTimeout(function() {
|
|
|
+ $notification.removeClass(type);
|
|
|
+ }, 3000);
|
|
|
+ }
|
|
|
|
|
|
function toggleEditor() {
|
|
|
$addExampleBtn.toggle();
|
|
|
@@ -277,8 +277,8 @@ $(document).ready(function() {
|
|
|
rp.post('/' + repoSlug + '/examples', { title: title })
|
|
|
.then(function(newExample) {
|
|
|
clearAndCloseEditor();
|
|
|
- $fileSelect.append(makeFileSelectOption(newExample));
|
|
|
- $fileSelect.val(newExample.slug);
|
|
|
+ // $fileSelect.append(makeFileSelectOption(newExample));
|
|
|
+ // $fileSelect.val(newExample.slug);
|
|
|
notify('success', "Exemple créé !");
|
|
|
})
|
|
|
.catch(errText => notify('error', 'Erreur: ' + errText));
|