Fix undefined variable 'select'

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Update JS for clarity and efficiency

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Merge branch 'refs/heads/copy-plugins-js-fix' into svm

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>

Conflicts:
	cms/static/cms/js/plugin_editor.js