# HG changeset patch # User Mads Kiilerich # Date 2015-11-17 02:42:07 # Node ID 007d1a34a35a68e5ccab2d17cc402736573536ee # Parent e8922e1d92e54f71329509140f610a5a37a72060 edit: refactor cut'n'pasted code, working towards unifying it diff --git a/kallithea/templates/admin/gists/edit.html b/kallithea/templates/admin/gists/edit.html --- a/kallithea/templates/admin/gists/edit.html +++ b/kallithea/templates/admin/gists/edit.html @@ -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 --git a/kallithea/templates/admin/gists/new.html b/kallithea/templates/admin/gists/new.html --- a/kallithea/templates/admin/gists/new.html +++ b/kallithea/templates/admin/gists/new.html @@ -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