]> git.parisson.com Git - telemeta.git/commitdiff
update
authorbalastegui <thomas.balastegui@gmail.com>
Thu, 12 May 2016 15:10:18 +0000 (17:10 +0200)
committerbalastegui <thomas.balastegui@gmail.com>
Thu, 12 May 2016 15:10:18 +0000 (17:10 +0200)
telemeta/templates/telemeta/lists.html

index ccda93758d5423d29ef8ccc7489e077702719c9f..39167a09340d1310b5838eb69c906caf43a0b136 100644 (file)
 <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
 <script>
 
-    /**
-      * Added by Thomas Balastegui :
-      * function that get variables from the Add popup
-      * and create a new playlist
-      */
-    var p = playlistUtils;
-    var ID = ""; // ID var: used to edit playlist
-    var title = "";
-    var description = "";
-
-    function addNewPlaylist() {
-        title = $('#titleAdd').val();
-        description = $('#descriptionAdd').val();
-        p.add({title,description});
-    }
-
-    // function to change global var ID (used when edit button is pressed)
-    function editVar(id) {
-        ID = id;
-        for (var i=0; i< p.playlists.length; i++){
-            if (p.playlists[i].id == id){
-                $('#titleEdit').val(p.playlists[i].title);
-                $('#descriptionEdit').val(p.playlists[i].description);
-            }
-        }
-    }
-
-    function editPlaylist() {
-        title = $('#titleEdit').val();
-        description = $('#descriptionEdit').val();
-        // Use of a function that convert params then use playlist.update
-        p.updateConvert(ID, title, description);
-        ID = ""; // init ID
-    }
-
     {% for playlist in playlists %}
         playlistUtils.addEditPlaylist('{{playlist.playlist.public_id}}','{{ playlist.playlist.title }}','{{playlist.playlist.description}}');
     {% endfor %}