# HG changeset patch # User Mads Kiilerich # Date 1447724527 -3600 # Node ID 007d1a34a35a68e5ccab2d17cc402736573536ee # Parent e8922e1d92e54f71329509140f610a5a37a72060 edit: refactor cut'n'pasted code, working towards unifying it diff -r e8922e1d92e5 -r 007d1a34a35a kallithea/templates/admin/gists/edit.html --- a/kallithea/templates/admin/gists/edit.html Tue Nov 17 02:42:01 2015 +0100 +++ b/kallithea/templates/admin/gists/edit.html Tue Nov 17 02:42:07 2015 +0100 @@ -85,8 +85,8 @@ var myCodeMirror = initCodeMirror("editor_${h.FID('f',file.path)}", "${request.script_name}", ''); //inject new modes - var $modes_select = $('#mimetype_${h.FID('f',file.path)}'); - $modes_select.each(function(){ + var $mimetype_select = $('#mimetype_${h.FID('f',file.path)}'); + $mimetype_select.each(function(){ var modes_select = this; var index = 1; for(var i=0;i diff -r e8922e1d92e5 -r 007d1a34a35a kallithea/templates/admin/gists/new.html --- a/kallithea/templates/admin/gists/new.html Tue Nov 17 02:42:01 2015 +0100 +++ b/kallithea/templates/admin/gists/new.html Tue Nov 17 02:42:07 2015 +0100 @@ -63,8 +63,8 @@ var myCodeMirror = initCodeMirror('editor', "${request.script_name}", ''); //inject new modes - var $modes_select = $('#mimetype'); - $modes_select.each(function(){ + var $mimetype_select = $('#mimetype'); + $mimetype_select.each(function(){ var modes_select = this; var index = 1; for(var i=0;i