ajaxorg/cloud9 — pull request #735 by mattpardee (2011-12-22 23:55:32+00:00)
Title: Hotfix/htmlpreview

@javruben @mikedeboer

This fixes the Preview button functionality by circumventing the use of the content type attribute, which was complicated by the fact that the client-side storage of the content type wouldn't be updated unless it asked jsDav for it.

Instead the html plugin stores its own file extensions that we allow to be previewed. If the tab editor is switched to that file, if the file is opened, or if the file is updated, then it checks the file extension against the array. It then enables or disables the Preview button accordingly.