From 5cfe2c01861eec9e9438fd5d47311adc2c92b477 Mon Sep 17 00:00:00 2001 From: kayone Date: Tue, 26 Aug 2014 13:17:00 -0700 Subject: [PATCH 1/2] handlebar templates are now .hbs instead of .html --- Gruntfile.js | 6 +++--- ...eriesLayoutTemplate.html => AddSeriesLayoutTemplate.hbs} | 0 ...AddSeriesViewTemplate.html => AddSeriesViewTemplate.hbs} | 0 .../{EmptyViewTemplate.html => EmptyViewTemplate.hbs} | 0 ...ate.html => AddExistingSeriesCollectionViewTemplate.hbs} | 0 .../{NotFoundTemplate.html => NotFoundTemplate.hbs} | 0 ...ItemViewTemplate.html => RootFolderItemViewTemplate.hbs} | 0 ...lderLayoutTemplate.html => RootFolderLayoutTemplate.hbs} | 0 ...SelectionPartial.html => RootFolderSelectionPartial.hbs} | 0 ...ResultViewTemplate.html => SearchResultViewTemplate.hbs} | 0 ...SelectionPartial.html => SeriesTypeSelectionPartial.hbs} | 0 ...ctionPartial.html => StartingSeasonSelectionPartial.hbs} | 0 ...arFeedViewTemplate.html => CalendarFeedViewTemplate.hbs} | 0 ...lendarLayoutTemplate.html => CalendarLayoutTemplate.hbs} | 0 ...ngItemViewTemplate.html => UpcomingItemViewTemplate.hbs} | 0 ...atusCellTemplate.html => ApprovalStatusCellTemplate.hbs} | 0 ...ellEditorTemplate.html => QualityCellEditorTemplate.hbs} | 0 ...ionsCellTemplate.html => EpisodeActionsCellTemplate.hbs} | 0 ...essCellTemplate.html => EpisodeProgressCellTemplate.hbs} | 0 .../{QualityCellTemplate.html => QualityCellTemplate.hbs} | 0 .../{SeriesTitleTemplate.html => SeriesTitleTemplate.hbs} | 0 ...ayoutTemplate.html => EpisodeActivityLayoutTemplate.hbs} | 0 ...ActivityViewTemplate.html => NoActivityViewTemplate.hbs} | 0 ...LayoutTemplate.html => EpisodeDetailsLayoutTemplate.hbs} | 0 .../{ButtonsViewTemplate.html => ButtonsViewTemplate.hbs} | 0 ...hLayoutTemplate.html => EpisodeSearchLayoutTemplate.hbs} | 0 .../{ManualLayoutTemplate.html => ManualLayoutTemplate.hbs} | 0 ...NoResultsViewTemplate.html => NoResultsViewTemplate.hbs} | 0 ...LayoutTemplate.html => EpisodeSummaryLayoutTemplate.hbs} | 0 .../{NoFileViewTemplate.html => NoFileViewTemplate.hbs} | 0 src/UI/Form/{CheckboxTemplate.html => CheckboxTemplate.hbs} | 0 src/UI/Form/{FormHelpPartial.html => FormHelpPartial.hbs} | 0 src/UI/Form/{PasswordTemplate.html => PasswordTemplate.hbs} | 0 src/UI/Form/{PathTemplate.html => PathTemplate.hbs} | 0 src/UI/Form/{SelectTemplate.html => SelectTemplate.hbs} | 0 src/UI/Form/{TextboxTemplate.html => TextboxTemplate.hbs} | 0 ...klistLayoutTemplate.html => BlacklistLayoutTemplate.hbs} | 0 ...LayoutTemplate.html => HistoryDetailsLayoutTemplate.hbs} | 0 ...ailsViewTemplate.html => HistoryDetailsViewTemplate.hbs} | 0 ...HistoryLayoutTemplate.html => HistoryLayoutTemplate.hbs} | 0 .../{QueueLayoutTemplate.html => QueueLayoutTemplate.hbs} | 0 ...leLayoutTemplate.html => HistoryTableLayoutTemplate.hbs} | 0 .../{HotkeysViewTemplate.html => HotkeysViewTemplate.hbs} | 0 .../{NavbarLayoutTemplate.html => NavbarLayoutTemplate.hbs} | 0 ...ileSelectionPartial.html => ProfileSelectionPartial.hbs} | 0 ...ReleaseLayoutTemplate.html => ReleaseLayoutTemplate.hbs} | 0 ...te.html => RenamePreviewEmptyCollectionViewTemplate.hbs} | 0 ...mViewTemplate.html => RenamePreviewItemViewTemplate.hbs} | 0 ...wLayoutTemplate.html => RenamePreviewLayoutTemplate.hbs} | 0 ...PassLayoutTemplate.html => SeasonPassLayoutTemplate.hbs} | 0 .../{SeriesLayoutTemplate.html => SeriesLayoutTemplate.hbs} | 0 .../{DeleteSeriesTemplate.html => DeleteSeriesTemplate.hbs} | 0 ...umberCellTemplate.html => EpisodeNumberCellTemplate.hbs} | 0 .../Details/{InfoViewTemplate.html => InfoViewTemplate.hbs} | 0 .../{SeasonLayoutTemplate.html => SeasonLayoutTemplate.hbs} | 0 ...SeriesDetailsTemplate.html => SeriesDetailsTemplate.hbs} | 0 ...itSeriesViewTemplate.html => EditSeriesViewTemplate.hbs} | 0 ...FilesViewTemplate.html => OrganizeFilesViewTemplate.hbs} | 0 ...ViewTemplate.html => SeriesEditorFooterViewTemplate.hbs} | 0 ...orLayoutTemplate.html => SeriesEditorLayoutTemplate.hbs} | 0 .../Series/Index/{EmptyTemplate.html => EmptyTemplate.hbs} | 0 ...isodeProgressPartial.html => EpisodeProgressPartial.hbs} | 0 .../{FooterViewTemplate.html => FooterViewTemplate.hbs} | 0 ...mplate.html => SeriesOverviewCollectionViewTemplate.hbs} | 0 ...ViewTemplate.html => SeriesOverviewItemViewTemplate.hbs} | 0 ...emplate.html => SeriesPostersCollectionViewTemplate.hbs} | 0 ...mViewTemplate.html => SeriesPostersItemViewTemplate.hbs} | 0 ...dexLayoutTemplate.html => SeriesIndexLayoutTemplate.hbs} | 0 ...ate.html => DownloadClientAddCollectionViewTemplate.hbs} | 0 ...wTemplate.html => DownloadClientAddItemViewTemplate.hbs} | 0 ...ewTemplate.html => DownloadClientDeleteViewTemplate.hbs} | 0 ...mplate.html => DownloadClientCollectionViewTemplate.hbs} | 0 ...ViewTemplate.html => DownloadClientItemViewTemplate.hbs} | 0 ...LayoutTemplate.html => DownloadClientLayoutTemplate.hbs} | 0 ...ngViewTemplate.html => DownloadHandlingViewTemplate.hbs} | 0 ...actoryViewTemplate.html => DroneFactoryViewTemplate.hbs} | 0 ...ViewTemplate.html => DownloadClientEditViewTemplate.hbs} | 0 .../{GeneralViewTemplate.html => GeneralViewTemplate.hbs} | 0 ...ewTemplate.html => IndexerAddCollectionViewTemplate.hbs} | 0 ...ItemViewTemplate.html => IndexerAddItemViewTemplate.hbs} | 0 ...eleteViewTemplate.html => IndexerDeleteViewTemplate.hbs} | 0 ...xerEditViewTemplate.html => IndexerEditViewTemplate.hbs} | 0 ...nViewTemplate.html => IndexerCollectionViewTemplate.hbs} | 0 ...xerItemViewTemplate.html => IndexerItemViewTemplate.hbs} | 0 ...IndexerLayoutTemplate.html => IndexerLayoutTemplate.hbs} | 0 ...ionsViewTemplate.html => IndexerOptionsViewTemplate.hbs} | 0 ...mentViewTemplate.html => FileManagementViewTemplate.hbs} | 0 ...ayoutTemplate.html => MediaManagementLayoutTemplate.hbs} | 0 ...cNamingViewTemplate.html => BasicNamingViewTemplate.hbs} | 0 .../{NamingViewTemplate.html => NamingViewTemplate.hbs} | 0 ...eNamingPartial.html => AbsoluteEpisodeNamingPartial.hbs} | 0 .../{AirDateNamingPartial.html => AirDateNamingPartial.hbs} | 0 .../{EpisodeNamingPartial.html => EpisodeNamingPartial.hbs} | 0 ...itleNamingPartial.html => EpisodeTitleNamingPartial.hbs} | 0 ...diaInfoNamingPartial.html => MediaInfoNamingPartial.hbs} | 0 ...tleNamingPartial.html => OriginalTitleNamingPartial.hbs} | 0 ...itleNamingPartial.html => QualityTitleNamingPartial.hbs} | 0 ...roupNamingPartial.html => ReleaseGroupNamingPartial.hbs} | 0 .../{SeasonNamingPartial.html => SeasonNamingPartial.hbs} | 0 ...paratorNamingPartial.html => SeparatorNamingPartial.hbs} | 0 ...TitleNamingPartial.html => SeriesTitleNamingPartial.hbs} | 0 ...issionsViewTemplate.html => PermissionsViewTemplate.hbs} | 0 .../{SortingViewTemplate.html => SortingViewTemplate.hbs} | 0 ...ViewTemplate.html => MetadataCollectionViewTemplate.hbs} | 0 ...taEditViewTemplate.html => MetadataEditViewTemplate.hbs} | 0 ...taItemViewTemplate.html => MetadataItemViewTemplate.hbs} | 0 ...tadataLayoutTemplate.html => MetadataLayoutTemplate.hbs} | 0 ...plate.html => NotificationAddCollectionViewTemplate.hbs} | 0 ...iewTemplate.html => NotificationAddItemViewTemplate.hbs} | 0 ...ViewTemplate.html => NotificationDeleteViewTemplate.hbs} | 0 ...itViewTemplate.html => NotificationEditViewTemplate.hbs} | 0 ...Template.html => NotificationCollectionViewTemplate.hbs} | 0 ...emViewTemplate.html => NotificationItemViewTemplate.hbs} | 0 ...ofileViewTemplate.html => DeleteProfileViewTemplate.hbs} | 0 ...temViewTemplate.html => EditProfileItemViewTemplate.hbs} | 0 ...ileLayoutTemplate.html => EditProfileLayoutTemplate.hbs} | 0 ...ProfileViewTemplate.html => EditProfileViewTemplate.hbs} | 0 ...ollectionTemplate.html => ProfileCollectionTemplate.hbs} | 0 ...ProfileLayoutTemplate.html => ProfileLayoutTemplate.hbs} | 0 .../{ProfileViewTemplate.html => ProfileViewTemplate.hbs} | 0 ...emplate.html => QualityDefinitionCollectionTemplate.hbs} | 0 ...nViewTemplate.html => QualityDefinitionViewTemplate.hbs} | 0 ...QualityLayoutTemplate.html => QualityLayoutTemplate.hbs} | 0 ...ttingsLayoutTemplate.html => SettingsLayoutTemplate.hbs} | 0 ...pViewTemplate.html => ThingyHeaderGroupViewTemplate.hbs} | 0 .../Settings/UI/{UiViewTemplate.html => UiViewTemplate.hbs} | 0 .../{JumpToPageTemplate.html => JumpToPageTemplate.hbs} | 0 .../Shared/Grid/{PagerTemplate.html => PagerTemplate.hbs} | 0 src/UI/Shared/{LoadingTemplate.html => LoadingTemplate.hbs} | 0 .../Shared/{NotFoundTemplate.html => NotFoundTemplate.hbs} | 0 .../Toolbar/{ButtonTemplate.html => ButtonTemplate.hbs} | 0 .../{RadioButtonTemplate.html => RadioButtonTemplate.hbs} | 0 ...emplate.html => SortingButtonCollectionViewTemplate.hbs} | 0 ...uttonViewTemplate.html => SortingButtonViewTemplate.hbs} | 0 ...ToolbarLayoutTemplate.html => ToolbarLayoutTemplate.hbs} | 0 ...upEmptyViewTemplate.html => BackupEmptyViewTemplate.hbs} | 0 ...nameCellTemplate.html => BackupFilenameCellTemplate.hbs} | 0 .../{BackupLayoutTemplate.html => BackupLayoutTemplate.hbs} | 0 .../About/{AboutViewTemplate.html => AboutViewTemplate.hbs} | 0 ...SpaceLayoutTemplate.html => DiskSpaceLayoutTemplate.hbs} | 0 .../{HealthLayoutTemplate.html => HealthLayoutTemplate.hbs} | 0 .../{HealthOkViewTemplate.html => HealthOkViewTemplate.hbs} | 0 ...InfoLayoutTemplate.html => SystemInfoLayoutTemplate.hbs} | 0 .../{ContentsViewTemplate.html => ContentsViewTemplate.hbs} | 0 ...LogFileLayoutTemplate.html => LogFileLayoutTemplate.hbs} | 0 .../{LogsLayoutTemplate.html => LogsLayoutTemplate.hbs} | 0 ...gDetailsViewTemplate.html => LogDetailsViewTemplate.hbs} | 0 ...TableLayoutTemplate.html => LogsTableLayoutTemplate.hbs} | 0 .../{SystemLayoutTemplate.html => SystemLayoutTemplate.hbs} | 0 .../{EmptyViewTemplate.html => EmptyViewTemplate.hbs} | 0 ...dateItemViewTemplate.html => UpdateItemViewTemplate.hbs} | 0 .../{UpdateLayoutTemplate.html => UpdateLayoutTemplate.hbs} | 0 ...ntrolsColumnTemplate.html => ControlsColumnTemplate.hbs} | 0 ...metLayoutTemplate.html => CutoffUnmetLayoutTemplate.hbs} | 0 ...MissingLayoutTemplate.html => MissingLayoutTemplate.hbs} | 0 .../{WantedLayoutTemplate.html => WantedLayoutTemplate.hbs} | 0 156 files changed, 3 insertions(+), 3 deletions(-) rename src/UI/AddSeries/{AddSeriesLayoutTemplate.html => AddSeriesLayoutTemplate.hbs} (100%) rename src/UI/AddSeries/{AddSeriesViewTemplate.html => AddSeriesViewTemplate.hbs} (100%) rename src/UI/AddSeries/{EmptyViewTemplate.html => EmptyViewTemplate.hbs} (100%) rename src/UI/AddSeries/Existing/{AddExistingSeriesCollectionViewTemplate.html => AddExistingSeriesCollectionViewTemplate.hbs} (100%) rename src/UI/AddSeries/{NotFoundTemplate.html => NotFoundTemplate.hbs} (100%) rename src/UI/AddSeries/RootFolders/{RootFolderItemViewTemplate.html => RootFolderItemViewTemplate.hbs} (100%) rename src/UI/AddSeries/RootFolders/{RootFolderLayoutTemplate.html => RootFolderLayoutTemplate.hbs} (100%) rename src/UI/AddSeries/RootFolders/{RootFolderSelectionPartial.html => RootFolderSelectionPartial.hbs} (100%) rename src/UI/AddSeries/{SearchResultViewTemplate.html => SearchResultViewTemplate.hbs} (100%) rename src/UI/AddSeries/{SeriesTypeSelectionPartial.html => SeriesTypeSelectionPartial.hbs} (100%) rename src/UI/AddSeries/{StartingSeasonSelectionPartial.html => StartingSeasonSelectionPartial.hbs} (100%) rename src/UI/Calendar/{CalendarFeedViewTemplate.html => CalendarFeedViewTemplate.hbs} (100%) rename src/UI/Calendar/{CalendarLayoutTemplate.html => CalendarLayoutTemplate.hbs} (100%) rename src/UI/Calendar/{UpcomingItemViewTemplate.html => UpcomingItemViewTemplate.hbs} (100%) rename src/UI/Cells/{ApprovalStatusCellTemplate.html => ApprovalStatusCellTemplate.hbs} (100%) rename src/UI/Cells/Edit/{QualityCellEditorTemplate.html => QualityCellEditorTemplate.hbs} (100%) rename src/UI/Cells/{EpisodeActionsCellTemplate.html => EpisodeActionsCellTemplate.hbs} (100%) rename src/UI/Cells/{EpisodeProgressCellTemplate.html => EpisodeProgressCellTemplate.hbs} (100%) rename src/UI/Cells/{QualityCellTemplate.html => QualityCellTemplate.hbs} (100%) rename src/UI/Cells/{SeriesTitleTemplate.html => SeriesTitleTemplate.hbs} (100%) rename src/UI/Episode/Activity/{EpisodeActivityLayoutTemplate.html => EpisodeActivityLayoutTemplate.hbs} (100%) rename src/UI/Episode/Activity/{NoActivityViewTemplate.html => NoActivityViewTemplate.hbs} (100%) rename src/UI/Episode/{EpisodeDetailsLayoutTemplate.html => EpisodeDetailsLayoutTemplate.hbs} (100%) rename src/UI/Episode/Search/{ButtonsViewTemplate.html => ButtonsViewTemplate.hbs} (100%) rename src/UI/Episode/Search/{EpisodeSearchLayoutTemplate.html => EpisodeSearchLayoutTemplate.hbs} (100%) rename src/UI/Episode/Search/{ManualLayoutTemplate.html => ManualLayoutTemplate.hbs} (100%) rename src/UI/Episode/Search/{NoResultsViewTemplate.html => NoResultsViewTemplate.hbs} (100%) rename src/UI/Episode/Summary/{EpisodeSummaryLayoutTemplate.html => EpisodeSummaryLayoutTemplate.hbs} (100%) rename src/UI/Episode/Summary/{NoFileViewTemplate.html => NoFileViewTemplate.hbs} (100%) rename src/UI/Form/{CheckboxTemplate.html => CheckboxTemplate.hbs} (100%) rename src/UI/Form/{FormHelpPartial.html => FormHelpPartial.hbs} (100%) rename src/UI/Form/{PasswordTemplate.html => PasswordTemplate.hbs} (100%) rename src/UI/Form/{PathTemplate.html => PathTemplate.hbs} (100%) rename src/UI/Form/{SelectTemplate.html => SelectTemplate.hbs} (100%) rename src/UI/Form/{TextboxTemplate.html => TextboxTemplate.hbs} (100%) rename src/UI/History/Blacklist/{BlacklistLayoutTemplate.html => BlacklistLayoutTemplate.hbs} (100%) rename src/UI/History/Details/{HistoryDetailsLayoutTemplate.html => HistoryDetailsLayoutTemplate.hbs} (100%) rename src/UI/History/Details/{HistoryDetailsViewTemplate.html => HistoryDetailsViewTemplate.hbs} (100%) rename src/UI/History/{HistoryLayoutTemplate.html => HistoryLayoutTemplate.hbs} (100%) rename src/UI/History/Queue/{QueueLayoutTemplate.html => QueueLayoutTemplate.hbs} (100%) rename src/UI/History/Table/{HistoryTableLayoutTemplate.html => HistoryTableLayoutTemplate.hbs} (100%) rename src/UI/Hotkeys/{HotkeysViewTemplate.html => HotkeysViewTemplate.hbs} (100%) rename src/UI/Navbar/{NavbarLayoutTemplate.html => NavbarLayoutTemplate.hbs} (100%) rename src/UI/Profile/{ProfileSelectionPartial.html => ProfileSelectionPartial.hbs} (100%) rename src/UI/Release/{ReleaseLayoutTemplate.html => ReleaseLayoutTemplate.hbs} (100%) rename src/UI/Rename/{RenamePreviewEmptyCollectionViewTemplate.html => RenamePreviewEmptyCollectionViewTemplate.hbs} (100%) rename src/UI/Rename/{RenamePreviewItemViewTemplate.html => RenamePreviewItemViewTemplate.hbs} (100%) rename src/UI/Rename/{RenamePreviewLayoutTemplate.html => RenamePreviewLayoutTemplate.hbs} (100%) rename src/UI/SeasonPass/{SeasonPassLayoutTemplate.html => SeasonPassLayoutTemplate.hbs} (100%) rename src/UI/SeasonPass/{SeriesLayoutTemplate.html => SeriesLayoutTemplate.hbs} (100%) rename src/UI/Series/Delete/{DeleteSeriesTemplate.html => DeleteSeriesTemplate.hbs} (100%) rename src/UI/Series/Details/{EpisodeNumberCellTemplate.html => EpisodeNumberCellTemplate.hbs} (100%) rename src/UI/Series/Details/{InfoViewTemplate.html => InfoViewTemplate.hbs} (100%) rename src/UI/Series/Details/{SeasonLayoutTemplate.html => SeasonLayoutTemplate.hbs} (100%) rename src/UI/Series/Details/{SeriesDetailsTemplate.html => SeriesDetailsTemplate.hbs} (100%) rename src/UI/Series/Edit/{EditSeriesViewTemplate.html => EditSeriesViewTemplate.hbs} (100%) rename src/UI/Series/Editor/Organize/{OrganizeFilesViewTemplate.html => OrganizeFilesViewTemplate.hbs} (100%) rename src/UI/Series/Editor/{SeriesEditorFooterViewTemplate.html => SeriesEditorFooterViewTemplate.hbs} (100%) rename src/UI/Series/Editor/{SeriesEditorLayoutTemplate.html => SeriesEditorLayoutTemplate.hbs} (100%) rename src/UI/Series/Index/{EmptyTemplate.html => EmptyTemplate.hbs} (100%) rename src/UI/Series/Index/{EpisodeProgressPartial.html => EpisodeProgressPartial.hbs} (100%) rename src/UI/Series/Index/{FooterViewTemplate.html => FooterViewTemplate.hbs} (100%) rename src/UI/Series/Index/Overview/{SeriesOverviewCollectionViewTemplate.html => SeriesOverviewCollectionViewTemplate.hbs} (100%) rename src/UI/Series/Index/Overview/{SeriesOverviewItemViewTemplate.html => SeriesOverviewItemViewTemplate.hbs} (100%) rename src/UI/Series/Index/Posters/{SeriesPostersCollectionViewTemplate.html => SeriesPostersCollectionViewTemplate.hbs} (100%) rename src/UI/Series/Index/Posters/{SeriesPostersItemViewTemplate.html => SeriesPostersItemViewTemplate.hbs} (100%) rename src/UI/Series/Index/{SeriesIndexLayoutTemplate.html => SeriesIndexLayoutTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/Add/{DownloadClientAddCollectionViewTemplate.html => DownloadClientAddCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/Add/{DownloadClientAddItemViewTemplate.html => DownloadClientAddItemViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/Delete/{DownloadClientDeleteViewTemplate.html => DownloadClientDeleteViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/{DownloadClientCollectionViewTemplate.html => DownloadClientCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/{DownloadClientItemViewTemplate.html => DownloadClientItemViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/{DownloadClientLayoutTemplate.html => DownloadClientLayoutTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/DownloadHandling/{DownloadHandlingViewTemplate.html => DownloadHandlingViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/DroneFactory/{DroneFactoryViewTemplate.html => DroneFactoryViewTemplate.hbs} (100%) rename src/UI/Settings/DownloadClient/Edit/{DownloadClientEditViewTemplate.html => DownloadClientEditViewTemplate.hbs} (100%) rename src/UI/Settings/General/{GeneralViewTemplate.html => GeneralViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/Add/{IndexerAddCollectionViewTemplate.html => IndexerAddCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/Add/{IndexerAddItemViewTemplate.html => IndexerAddItemViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/Delete/{IndexerDeleteViewTemplate.html => IndexerDeleteViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/Edit/{IndexerEditViewTemplate.html => IndexerEditViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/{IndexerCollectionViewTemplate.html => IndexerCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/{IndexerItemViewTemplate.html => IndexerItemViewTemplate.hbs} (100%) rename src/UI/Settings/Indexers/{IndexerLayoutTemplate.html => IndexerLayoutTemplate.hbs} (100%) rename src/UI/Settings/Indexers/Options/{IndexerOptionsViewTemplate.html => IndexerOptionsViewTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/FileManagement/{FileManagementViewTemplate.html => FileManagementViewTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/{MediaManagementLayoutTemplate.html => MediaManagementLayoutTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Basic/{BasicNamingViewTemplate.html => BasicNamingViewTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/{NamingViewTemplate.html => NamingViewTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{AbsoluteEpisodeNamingPartial.html => AbsoluteEpisodeNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{AirDateNamingPartial.html => AirDateNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{EpisodeNamingPartial.html => EpisodeNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{EpisodeTitleNamingPartial.html => EpisodeTitleNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{MediaInfoNamingPartial.html => MediaInfoNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{OriginalTitleNamingPartial.html => OriginalTitleNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{QualityTitleNamingPartial.html => QualityTitleNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{ReleaseGroupNamingPartial.html => ReleaseGroupNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{SeasonNamingPartial.html => SeasonNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{SeparatorNamingPartial.html => SeparatorNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Naming/Partials/{SeriesTitleNamingPartial.html => SeriesTitleNamingPartial.hbs} (100%) rename src/UI/Settings/MediaManagement/Permissions/{PermissionsViewTemplate.html => PermissionsViewTemplate.hbs} (100%) rename src/UI/Settings/MediaManagement/Sorting/{SortingViewTemplate.html => SortingViewTemplate.hbs} (100%) rename src/UI/Settings/Metadata/{MetadataCollectionViewTemplate.html => MetadataCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/Metadata/{MetadataEditViewTemplate.html => MetadataEditViewTemplate.hbs} (100%) rename src/UI/Settings/Metadata/{MetadataItemViewTemplate.html => MetadataItemViewTemplate.hbs} (100%) rename src/UI/Settings/Metadata/{MetadataLayoutTemplate.html => MetadataLayoutTemplate.hbs} (100%) rename src/UI/Settings/Notifications/Add/{NotificationAddCollectionViewTemplate.html => NotificationAddCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/Notifications/Add/{NotificationAddItemViewTemplate.html => NotificationAddItemViewTemplate.hbs} (100%) rename src/UI/Settings/Notifications/Delete/{NotificationDeleteViewTemplate.html => NotificationDeleteViewTemplate.hbs} (100%) rename src/UI/Settings/Notifications/Edit/{NotificationEditViewTemplate.html => NotificationEditViewTemplate.hbs} (100%) rename src/UI/Settings/Notifications/{NotificationCollectionViewTemplate.html => NotificationCollectionViewTemplate.hbs} (100%) rename src/UI/Settings/Notifications/{NotificationItemViewTemplate.html => NotificationItemViewTemplate.hbs} (100%) rename src/UI/Settings/Profile/{DeleteProfileViewTemplate.html => DeleteProfileViewTemplate.hbs} (100%) rename src/UI/Settings/Profile/Edit/{EditProfileItemViewTemplate.html => EditProfileItemViewTemplate.hbs} (100%) rename src/UI/Settings/Profile/Edit/{EditProfileLayoutTemplate.html => EditProfileLayoutTemplate.hbs} (100%) rename src/UI/Settings/Profile/Edit/{EditProfileViewTemplate.html => EditProfileViewTemplate.hbs} (100%) rename src/UI/Settings/Profile/{ProfileCollectionTemplate.html => ProfileCollectionTemplate.hbs} (100%) rename src/UI/Settings/Profile/{ProfileLayoutTemplate.html => ProfileLayoutTemplate.hbs} (100%) rename src/UI/Settings/Profile/{ProfileViewTemplate.html => ProfileViewTemplate.hbs} (100%) rename src/UI/Settings/Quality/Definition/{QualityDefinitionCollectionTemplate.html => QualityDefinitionCollectionTemplate.hbs} (100%) rename src/UI/Settings/Quality/Definition/{QualityDefinitionViewTemplate.html => QualityDefinitionViewTemplate.hbs} (100%) rename src/UI/Settings/Quality/{QualityLayoutTemplate.html => QualityLayoutTemplate.hbs} (100%) rename src/UI/Settings/{SettingsLayoutTemplate.html => SettingsLayoutTemplate.hbs} (100%) rename src/UI/Settings/{ThingyHeaderGroupViewTemplate.html => ThingyHeaderGroupViewTemplate.hbs} (100%) rename src/UI/Settings/UI/{UiViewTemplate.html => UiViewTemplate.hbs} (100%) rename src/UI/Shared/Grid/{JumpToPageTemplate.html => JumpToPageTemplate.hbs} (100%) rename src/UI/Shared/Grid/{PagerTemplate.html => PagerTemplate.hbs} (100%) rename src/UI/Shared/{LoadingTemplate.html => LoadingTemplate.hbs} (100%) rename src/UI/Shared/{NotFoundTemplate.html => NotFoundTemplate.hbs} (100%) rename src/UI/Shared/Toolbar/{ButtonTemplate.html => ButtonTemplate.hbs} (100%) rename src/UI/Shared/Toolbar/{RadioButtonTemplate.html => RadioButtonTemplate.hbs} (100%) rename src/UI/Shared/Toolbar/Sorting/{SortingButtonCollectionViewTemplate.html => SortingButtonCollectionViewTemplate.hbs} (100%) rename src/UI/Shared/Toolbar/Sorting/{SortingButtonViewTemplate.html => SortingButtonViewTemplate.hbs} (100%) rename src/UI/Shared/Toolbar/{ToolbarLayoutTemplate.html => ToolbarLayoutTemplate.hbs} (100%) rename src/UI/System/Backup/{BackupEmptyViewTemplate.html => BackupEmptyViewTemplate.hbs} (100%) rename src/UI/System/Backup/{BackupFilenameCellTemplate.html => BackupFilenameCellTemplate.hbs} (100%) rename src/UI/System/Backup/{BackupLayoutTemplate.html => BackupLayoutTemplate.hbs} (100%) rename src/UI/System/Info/About/{AboutViewTemplate.html => AboutViewTemplate.hbs} (100%) rename src/UI/System/Info/DiskSpace/{DiskSpaceLayoutTemplate.html => DiskSpaceLayoutTemplate.hbs} (100%) rename src/UI/System/Info/Health/{HealthLayoutTemplate.html => HealthLayoutTemplate.hbs} (100%) rename src/UI/System/Info/Health/{HealthOkViewTemplate.html => HealthOkViewTemplate.hbs} (100%) rename src/UI/System/Info/{SystemInfoLayoutTemplate.html => SystemInfoLayoutTemplate.hbs} (100%) rename src/UI/System/Logs/Files/{ContentsViewTemplate.html => ContentsViewTemplate.hbs} (100%) rename src/UI/System/Logs/Files/{LogFileLayoutTemplate.html => LogFileLayoutTemplate.hbs} (100%) rename src/UI/System/Logs/{LogsLayoutTemplate.html => LogsLayoutTemplate.hbs} (100%) rename src/UI/System/Logs/Table/Details/{LogDetailsViewTemplate.html => LogDetailsViewTemplate.hbs} (100%) rename src/UI/System/Logs/Table/{LogsTableLayoutTemplate.html => LogsTableLayoutTemplate.hbs} (100%) rename src/UI/System/{SystemLayoutTemplate.html => SystemLayoutTemplate.hbs} (100%) rename src/UI/System/Update/{EmptyViewTemplate.html => EmptyViewTemplate.hbs} (100%) rename src/UI/System/Update/{UpdateItemViewTemplate.html => UpdateItemViewTemplate.hbs} (100%) rename src/UI/System/Update/{UpdateLayoutTemplate.html => UpdateLayoutTemplate.hbs} (100%) rename src/UI/Wanted/{ControlsColumnTemplate.html => ControlsColumnTemplate.hbs} (100%) rename src/UI/Wanted/Cutoff/{CutoffUnmetLayoutTemplate.html => CutoffUnmetLayoutTemplate.hbs} (100%) rename src/UI/Wanted/Missing/{MissingLayoutTemplate.html => MissingLayoutTemplate.hbs} (100%) rename src/UI/Wanted/{WantedLayoutTemplate.html => WantedLayoutTemplate.hbs} (100%) diff --git a/Gruntfile.js b/Gruntfile.js index 35deb38bb..df1a59a51 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -53,18 +53,18 @@ module.exports = function (grunt) { handlebars: { options: { namespace : 'T', - partialRegex: /Partial.html/, + partialRegex: /Partial.hbs/, wrapped : true, amd : true, processName: function (fileName) { return fileName .replace(srcRoot, '') - .replace('.html', '') + .replace('.hbs', '') .toLowerCase(); } }, files : { - src : [ srcRoot + '**/*Template.html', srcRoot + '**/*Partial.html'], + src : [ srcRoot + '**/*Template.hbs', srcRoot + '**/*Partial.hbs'], dest: outputDir + 'templates.js' } }, diff --git a/src/UI/AddSeries/AddSeriesLayoutTemplate.html b/src/UI/AddSeries/AddSeriesLayoutTemplate.hbs similarity index 100% rename from src/UI/AddSeries/AddSeriesLayoutTemplate.html rename to src/UI/AddSeries/AddSeriesLayoutTemplate.hbs diff --git a/src/UI/AddSeries/AddSeriesViewTemplate.html b/src/UI/AddSeries/AddSeriesViewTemplate.hbs similarity index 100% rename from src/UI/AddSeries/AddSeriesViewTemplate.html rename to src/UI/AddSeries/AddSeriesViewTemplate.hbs diff --git a/src/UI/AddSeries/EmptyViewTemplate.html b/src/UI/AddSeries/EmptyViewTemplate.hbs similarity index 100% rename from src/UI/AddSeries/EmptyViewTemplate.html rename to src/UI/AddSeries/EmptyViewTemplate.hbs diff --git a/src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.html b/src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.hbs similarity index 100% rename from src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.html rename to src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.hbs diff --git a/src/UI/AddSeries/NotFoundTemplate.html b/src/UI/AddSeries/NotFoundTemplate.hbs similarity index 100% rename from src/UI/AddSeries/NotFoundTemplate.html rename to src/UI/AddSeries/NotFoundTemplate.hbs diff --git a/src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.html b/src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.hbs similarity index 100% rename from src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.html rename to src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.hbs diff --git a/src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.html b/src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.hbs similarity index 100% rename from src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.html rename to src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.hbs diff --git a/src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.html b/src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.hbs similarity index 100% rename from src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.html rename to src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.hbs diff --git a/src/UI/AddSeries/SearchResultViewTemplate.html b/src/UI/AddSeries/SearchResultViewTemplate.hbs similarity index 100% rename from src/UI/AddSeries/SearchResultViewTemplate.html rename to src/UI/AddSeries/SearchResultViewTemplate.hbs diff --git a/src/UI/AddSeries/SeriesTypeSelectionPartial.html b/src/UI/AddSeries/SeriesTypeSelectionPartial.hbs similarity index 100% rename from src/UI/AddSeries/SeriesTypeSelectionPartial.html rename to src/UI/AddSeries/SeriesTypeSelectionPartial.hbs diff --git a/src/UI/AddSeries/StartingSeasonSelectionPartial.html b/src/UI/AddSeries/StartingSeasonSelectionPartial.hbs similarity index 100% rename from src/UI/AddSeries/StartingSeasonSelectionPartial.html rename to src/UI/AddSeries/StartingSeasonSelectionPartial.hbs diff --git a/src/UI/Calendar/CalendarFeedViewTemplate.html b/src/UI/Calendar/CalendarFeedViewTemplate.hbs similarity index 100% rename from src/UI/Calendar/CalendarFeedViewTemplate.html rename to src/UI/Calendar/CalendarFeedViewTemplate.hbs diff --git a/src/UI/Calendar/CalendarLayoutTemplate.html b/src/UI/Calendar/CalendarLayoutTemplate.hbs similarity index 100% rename from src/UI/Calendar/CalendarLayoutTemplate.html rename to src/UI/Calendar/CalendarLayoutTemplate.hbs diff --git a/src/UI/Calendar/UpcomingItemViewTemplate.html b/src/UI/Calendar/UpcomingItemViewTemplate.hbs similarity index 100% rename from src/UI/Calendar/UpcomingItemViewTemplate.html rename to src/UI/Calendar/UpcomingItemViewTemplate.hbs diff --git a/src/UI/Cells/ApprovalStatusCellTemplate.html b/src/UI/Cells/ApprovalStatusCellTemplate.hbs similarity index 100% rename from src/UI/Cells/ApprovalStatusCellTemplate.html rename to src/UI/Cells/ApprovalStatusCellTemplate.hbs diff --git a/src/UI/Cells/Edit/QualityCellEditorTemplate.html b/src/UI/Cells/Edit/QualityCellEditorTemplate.hbs similarity index 100% rename from src/UI/Cells/Edit/QualityCellEditorTemplate.html rename to src/UI/Cells/Edit/QualityCellEditorTemplate.hbs diff --git a/src/UI/Cells/EpisodeActionsCellTemplate.html b/src/UI/Cells/EpisodeActionsCellTemplate.hbs similarity index 100% rename from src/UI/Cells/EpisodeActionsCellTemplate.html rename to src/UI/Cells/EpisodeActionsCellTemplate.hbs diff --git a/src/UI/Cells/EpisodeProgressCellTemplate.html b/src/UI/Cells/EpisodeProgressCellTemplate.hbs similarity index 100% rename from src/UI/Cells/EpisodeProgressCellTemplate.html rename to src/UI/Cells/EpisodeProgressCellTemplate.hbs diff --git a/src/UI/Cells/QualityCellTemplate.html b/src/UI/Cells/QualityCellTemplate.hbs similarity index 100% rename from src/UI/Cells/QualityCellTemplate.html rename to src/UI/Cells/QualityCellTemplate.hbs diff --git a/src/UI/Cells/SeriesTitleTemplate.html b/src/UI/Cells/SeriesTitleTemplate.hbs similarity index 100% rename from src/UI/Cells/SeriesTitleTemplate.html rename to src/UI/Cells/SeriesTitleTemplate.hbs diff --git a/src/UI/Episode/Activity/EpisodeActivityLayoutTemplate.html b/src/UI/Episode/Activity/EpisodeActivityLayoutTemplate.hbs similarity index 100% rename from src/UI/Episode/Activity/EpisodeActivityLayoutTemplate.html rename to src/UI/Episode/Activity/EpisodeActivityLayoutTemplate.hbs diff --git a/src/UI/Episode/Activity/NoActivityViewTemplate.html b/src/UI/Episode/Activity/NoActivityViewTemplate.hbs similarity index 100% rename from src/UI/Episode/Activity/NoActivityViewTemplate.html rename to src/UI/Episode/Activity/NoActivityViewTemplate.hbs diff --git a/src/UI/Episode/EpisodeDetailsLayoutTemplate.html b/src/UI/Episode/EpisodeDetailsLayoutTemplate.hbs similarity index 100% rename from src/UI/Episode/EpisodeDetailsLayoutTemplate.html rename to src/UI/Episode/EpisodeDetailsLayoutTemplate.hbs diff --git a/src/UI/Episode/Search/ButtonsViewTemplate.html b/src/UI/Episode/Search/ButtonsViewTemplate.hbs similarity index 100% rename from src/UI/Episode/Search/ButtonsViewTemplate.html rename to src/UI/Episode/Search/ButtonsViewTemplate.hbs diff --git a/src/UI/Episode/Search/EpisodeSearchLayoutTemplate.html b/src/UI/Episode/Search/EpisodeSearchLayoutTemplate.hbs similarity index 100% rename from src/UI/Episode/Search/EpisodeSearchLayoutTemplate.html rename to src/UI/Episode/Search/EpisodeSearchLayoutTemplate.hbs diff --git a/src/UI/Episode/Search/ManualLayoutTemplate.html b/src/UI/Episode/Search/ManualLayoutTemplate.hbs similarity index 100% rename from src/UI/Episode/Search/ManualLayoutTemplate.html rename to src/UI/Episode/Search/ManualLayoutTemplate.hbs diff --git a/src/UI/Episode/Search/NoResultsViewTemplate.html b/src/UI/Episode/Search/NoResultsViewTemplate.hbs similarity index 100% rename from src/UI/Episode/Search/NoResultsViewTemplate.html rename to src/UI/Episode/Search/NoResultsViewTemplate.hbs diff --git a/src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.html b/src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.hbs similarity index 100% rename from src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.html rename to src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.hbs diff --git a/src/UI/Episode/Summary/NoFileViewTemplate.html b/src/UI/Episode/Summary/NoFileViewTemplate.hbs similarity index 100% rename from src/UI/Episode/Summary/NoFileViewTemplate.html rename to src/UI/Episode/Summary/NoFileViewTemplate.hbs diff --git a/src/UI/Form/CheckboxTemplate.html b/src/UI/Form/CheckboxTemplate.hbs similarity index 100% rename from src/UI/Form/CheckboxTemplate.html rename to src/UI/Form/CheckboxTemplate.hbs diff --git a/src/UI/Form/FormHelpPartial.html b/src/UI/Form/FormHelpPartial.hbs similarity index 100% rename from src/UI/Form/FormHelpPartial.html rename to src/UI/Form/FormHelpPartial.hbs diff --git a/src/UI/Form/PasswordTemplate.html b/src/UI/Form/PasswordTemplate.hbs similarity index 100% rename from src/UI/Form/PasswordTemplate.html rename to src/UI/Form/PasswordTemplate.hbs diff --git a/src/UI/Form/PathTemplate.html b/src/UI/Form/PathTemplate.hbs similarity index 100% rename from src/UI/Form/PathTemplate.html rename to src/UI/Form/PathTemplate.hbs diff --git a/src/UI/Form/SelectTemplate.html b/src/UI/Form/SelectTemplate.hbs similarity index 100% rename from src/UI/Form/SelectTemplate.html rename to src/UI/Form/SelectTemplate.hbs diff --git a/src/UI/Form/TextboxTemplate.html b/src/UI/Form/TextboxTemplate.hbs similarity index 100% rename from src/UI/Form/TextboxTemplate.html rename to src/UI/Form/TextboxTemplate.hbs diff --git a/src/UI/History/Blacklist/BlacklistLayoutTemplate.html b/src/UI/History/Blacklist/BlacklistLayoutTemplate.hbs similarity index 100% rename from src/UI/History/Blacklist/BlacklistLayoutTemplate.html rename to src/UI/History/Blacklist/BlacklistLayoutTemplate.hbs diff --git a/src/UI/History/Details/HistoryDetailsLayoutTemplate.html b/src/UI/History/Details/HistoryDetailsLayoutTemplate.hbs similarity index 100% rename from src/UI/History/Details/HistoryDetailsLayoutTemplate.html rename to src/UI/History/Details/HistoryDetailsLayoutTemplate.hbs diff --git a/src/UI/History/Details/HistoryDetailsViewTemplate.html b/src/UI/History/Details/HistoryDetailsViewTemplate.hbs similarity index 100% rename from src/UI/History/Details/HistoryDetailsViewTemplate.html rename to src/UI/History/Details/HistoryDetailsViewTemplate.hbs diff --git a/src/UI/History/HistoryLayoutTemplate.html b/src/UI/History/HistoryLayoutTemplate.hbs similarity index 100% rename from src/UI/History/HistoryLayoutTemplate.html rename to src/UI/History/HistoryLayoutTemplate.hbs diff --git a/src/UI/History/Queue/QueueLayoutTemplate.html b/src/UI/History/Queue/QueueLayoutTemplate.hbs similarity index 100% rename from src/UI/History/Queue/QueueLayoutTemplate.html rename to src/UI/History/Queue/QueueLayoutTemplate.hbs diff --git a/src/UI/History/Table/HistoryTableLayoutTemplate.html b/src/UI/History/Table/HistoryTableLayoutTemplate.hbs similarity index 100% rename from src/UI/History/Table/HistoryTableLayoutTemplate.html rename to src/UI/History/Table/HistoryTableLayoutTemplate.hbs diff --git a/src/UI/Hotkeys/HotkeysViewTemplate.html b/src/UI/Hotkeys/HotkeysViewTemplate.hbs similarity index 100% rename from src/UI/Hotkeys/HotkeysViewTemplate.html rename to src/UI/Hotkeys/HotkeysViewTemplate.hbs diff --git a/src/UI/Navbar/NavbarLayoutTemplate.html b/src/UI/Navbar/NavbarLayoutTemplate.hbs similarity index 100% rename from src/UI/Navbar/NavbarLayoutTemplate.html rename to src/UI/Navbar/NavbarLayoutTemplate.hbs diff --git a/src/UI/Profile/ProfileSelectionPartial.html b/src/UI/Profile/ProfileSelectionPartial.hbs similarity index 100% rename from src/UI/Profile/ProfileSelectionPartial.html rename to src/UI/Profile/ProfileSelectionPartial.hbs diff --git a/src/UI/Release/ReleaseLayoutTemplate.html b/src/UI/Release/ReleaseLayoutTemplate.hbs similarity index 100% rename from src/UI/Release/ReleaseLayoutTemplate.html rename to src/UI/Release/ReleaseLayoutTemplate.hbs diff --git a/src/UI/Rename/RenamePreviewEmptyCollectionViewTemplate.html b/src/UI/Rename/RenamePreviewEmptyCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Rename/RenamePreviewEmptyCollectionViewTemplate.html rename to src/UI/Rename/RenamePreviewEmptyCollectionViewTemplate.hbs diff --git a/src/UI/Rename/RenamePreviewItemViewTemplate.html b/src/UI/Rename/RenamePreviewItemViewTemplate.hbs similarity index 100% rename from src/UI/Rename/RenamePreviewItemViewTemplate.html rename to src/UI/Rename/RenamePreviewItemViewTemplate.hbs diff --git a/src/UI/Rename/RenamePreviewLayoutTemplate.html b/src/UI/Rename/RenamePreviewLayoutTemplate.hbs similarity index 100% rename from src/UI/Rename/RenamePreviewLayoutTemplate.html rename to src/UI/Rename/RenamePreviewLayoutTemplate.hbs diff --git a/src/UI/SeasonPass/SeasonPassLayoutTemplate.html b/src/UI/SeasonPass/SeasonPassLayoutTemplate.hbs similarity index 100% rename from src/UI/SeasonPass/SeasonPassLayoutTemplate.html rename to src/UI/SeasonPass/SeasonPassLayoutTemplate.hbs diff --git a/src/UI/SeasonPass/SeriesLayoutTemplate.html b/src/UI/SeasonPass/SeriesLayoutTemplate.hbs similarity index 100% rename from src/UI/SeasonPass/SeriesLayoutTemplate.html rename to src/UI/SeasonPass/SeriesLayoutTemplate.hbs diff --git a/src/UI/Series/Delete/DeleteSeriesTemplate.html b/src/UI/Series/Delete/DeleteSeriesTemplate.hbs similarity index 100% rename from src/UI/Series/Delete/DeleteSeriesTemplate.html rename to src/UI/Series/Delete/DeleteSeriesTemplate.hbs diff --git a/src/UI/Series/Details/EpisodeNumberCellTemplate.html b/src/UI/Series/Details/EpisodeNumberCellTemplate.hbs similarity index 100% rename from src/UI/Series/Details/EpisodeNumberCellTemplate.html rename to src/UI/Series/Details/EpisodeNumberCellTemplate.hbs diff --git a/src/UI/Series/Details/InfoViewTemplate.html b/src/UI/Series/Details/InfoViewTemplate.hbs similarity index 100% rename from src/UI/Series/Details/InfoViewTemplate.html rename to src/UI/Series/Details/InfoViewTemplate.hbs diff --git a/src/UI/Series/Details/SeasonLayoutTemplate.html b/src/UI/Series/Details/SeasonLayoutTemplate.hbs similarity index 100% rename from src/UI/Series/Details/SeasonLayoutTemplate.html rename to src/UI/Series/Details/SeasonLayoutTemplate.hbs diff --git a/src/UI/Series/Details/SeriesDetailsTemplate.html b/src/UI/Series/Details/SeriesDetailsTemplate.hbs similarity index 100% rename from src/UI/Series/Details/SeriesDetailsTemplate.html rename to src/UI/Series/Details/SeriesDetailsTemplate.hbs diff --git a/src/UI/Series/Edit/EditSeriesViewTemplate.html b/src/UI/Series/Edit/EditSeriesViewTemplate.hbs similarity index 100% rename from src/UI/Series/Edit/EditSeriesViewTemplate.html rename to src/UI/Series/Edit/EditSeriesViewTemplate.hbs diff --git a/src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.html b/src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.hbs similarity index 100% rename from src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.html rename to src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.hbs diff --git a/src/UI/Series/Editor/SeriesEditorFooterViewTemplate.html b/src/UI/Series/Editor/SeriesEditorFooterViewTemplate.hbs similarity index 100% rename from src/UI/Series/Editor/SeriesEditorFooterViewTemplate.html rename to src/UI/Series/Editor/SeriesEditorFooterViewTemplate.hbs diff --git a/src/UI/Series/Editor/SeriesEditorLayoutTemplate.html b/src/UI/Series/Editor/SeriesEditorLayoutTemplate.hbs similarity index 100% rename from src/UI/Series/Editor/SeriesEditorLayoutTemplate.html rename to src/UI/Series/Editor/SeriesEditorLayoutTemplate.hbs diff --git a/src/UI/Series/Index/EmptyTemplate.html b/src/UI/Series/Index/EmptyTemplate.hbs similarity index 100% rename from src/UI/Series/Index/EmptyTemplate.html rename to src/UI/Series/Index/EmptyTemplate.hbs diff --git a/src/UI/Series/Index/EpisodeProgressPartial.html b/src/UI/Series/Index/EpisodeProgressPartial.hbs similarity index 100% rename from src/UI/Series/Index/EpisodeProgressPartial.html rename to src/UI/Series/Index/EpisodeProgressPartial.hbs diff --git a/src/UI/Series/Index/FooterViewTemplate.html b/src/UI/Series/Index/FooterViewTemplate.hbs similarity index 100% rename from src/UI/Series/Index/FooterViewTemplate.html rename to src/UI/Series/Index/FooterViewTemplate.hbs diff --git a/src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.html b/src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.html rename to src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.hbs diff --git a/src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.html b/src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.hbs similarity index 100% rename from src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.html rename to src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.hbs diff --git a/src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.html b/src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.html rename to src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.hbs diff --git a/src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.html b/src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.hbs similarity index 100% rename from src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.html rename to src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.hbs diff --git a/src/UI/Series/Index/SeriesIndexLayoutTemplate.html b/src/UI/Series/Index/SeriesIndexLayoutTemplate.hbs similarity index 100% rename from src/UI/Series/Index/SeriesIndexLayoutTemplate.html rename to src/UI/Series/Index/SeriesIndexLayoutTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/Add/DownloadClientAddCollectionViewTemplate.html b/src/UI/Settings/DownloadClient/Add/DownloadClientAddCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/Add/DownloadClientAddCollectionViewTemplate.html rename to src/UI/Settings/DownloadClient/Add/DownloadClientAddCollectionViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/Add/DownloadClientAddItemViewTemplate.html b/src/UI/Settings/DownloadClient/Add/DownloadClientAddItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/Add/DownloadClientAddItemViewTemplate.html rename to src/UI/Settings/DownloadClient/Add/DownloadClientAddItemViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/Delete/DownloadClientDeleteViewTemplate.html b/src/UI/Settings/DownloadClient/Delete/DownloadClientDeleteViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/Delete/DownloadClientDeleteViewTemplate.html rename to src/UI/Settings/DownloadClient/Delete/DownloadClientDeleteViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/DownloadClientCollectionViewTemplate.html b/src/UI/Settings/DownloadClient/DownloadClientCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/DownloadClientCollectionViewTemplate.html rename to src/UI/Settings/DownloadClient/DownloadClientCollectionViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/DownloadClientItemViewTemplate.html b/src/UI/Settings/DownloadClient/DownloadClientItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/DownloadClientItemViewTemplate.html rename to src/UI/Settings/DownloadClient/DownloadClientItemViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/DownloadClientLayoutTemplate.html b/src/UI/Settings/DownloadClient/DownloadClientLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/DownloadClientLayoutTemplate.html rename to src/UI/Settings/DownloadClient/DownloadClientLayoutTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/DownloadHandling/DownloadHandlingViewTemplate.html b/src/UI/Settings/DownloadClient/DownloadHandling/DownloadHandlingViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/DownloadHandling/DownloadHandlingViewTemplate.html rename to src/UI/Settings/DownloadClient/DownloadHandling/DownloadHandlingViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/DroneFactory/DroneFactoryViewTemplate.html b/src/UI/Settings/DownloadClient/DroneFactory/DroneFactoryViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/DroneFactory/DroneFactoryViewTemplate.html rename to src/UI/Settings/DownloadClient/DroneFactory/DroneFactoryViewTemplate.hbs diff --git a/src/UI/Settings/DownloadClient/Edit/DownloadClientEditViewTemplate.html b/src/UI/Settings/DownloadClient/Edit/DownloadClientEditViewTemplate.hbs similarity index 100% rename from src/UI/Settings/DownloadClient/Edit/DownloadClientEditViewTemplate.html rename to src/UI/Settings/DownloadClient/Edit/DownloadClientEditViewTemplate.hbs diff --git a/src/UI/Settings/General/GeneralViewTemplate.html b/src/UI/Settings/General/GeneralViewTemplate.hbs similarity index 100% rename from src/UI/Settings/General/GeneralViewTemplate.html rename to src/UI/Settings/General/GeneralViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/Add/IndexerAddCollectionViewTemplate.html b/src/UI/Settings/Indexers/Add/IndexerAddCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/Add/IndexerAddCollectionViewTemplate.html rename to src/UI/Settings/Indexers/Add/IndexerAddCollectionViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/Add/IndexerAddItemViewTemplate.html b/src/UI/Settings/Indexers/Add/IndexerAddItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/Add/IndexerAddItemViewTemplate.html rename to src/UI/Settings/Indexers/Add/IndexerAddItemViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/Delete/IndexerDeleteViewTemplate.html b/src/UI/Settings/Indexers/Delete/IndexerDeleteViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/Delete/IndexerDeleteViewTemplate.html rename to src/UI/Settings/Indexers/Delete/IndexerDeleteViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/Edit/IndexerEditViewTemplate.html b/src/UI/Settings/Indexers/Edit/IndexerEditViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/Edit/IndexerEditViewTemplate.html rename to src/UI/Settings/Indexers/Edit/IndexerEditViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/IndexerCollectionViewTemplate.html b/src/UI/Settings/Indexers/IndexerCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/IndexerCollectionViewTemplate.html rename to src/UI/Settings/Indexers/IndexerCollectionViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/IndexerItemViewTemplate.html b/src/UI/Settings/Indexers/IndexerItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/IndexerItemViewTemplate.html rename to src/UI/Settings/Indexers/IndexerItemViewTemplate.hbs diff --git a/src/UI/Settings/Indexers/IndexerLayoutTemplate.html b/src/UI/Settings/Indexers/IndexerLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/IndexerLayoutTemplate.html rename to src/UI/Settings/Indexers/IndexerLayoutTemplate.hbs diff --git a/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.html b/src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.html rename to src/UI/Settings/Indexers/Options/IndexerOptionsViewTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/FileManagement/FileManagementViewTemplate.html b/src/UI/Settings/MediaManagement/FileManagement/FileManagementViewTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/FileManagement/FileManagementViewTemplate.html rename to src/UI/Settings/MediaManagement/FileManagement/FileManagementViewTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/MediaManagementLayoutTemplate.html b/src/UI/Settings/MediaManagement/MediaManagementLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/MediaManagementLayoutTemplate.html rename to src/UI/Settings/MediaManagement/MediaManagementLayoutTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate.html b/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate.html rename to src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/NamingViewTemplate.html b/src/UI/Settings/MediaManagement/Naming/NamingViewTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/NamingViewTemplate.html rename to src/UI/Settings/MediaManagement/Naming/NamingViewTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/AbsoluteEpisodeNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/AbsoluteEpisodeNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/AbsoluteEpisodeNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/AbsoluteEpisodeNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/AirDateNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/AirDateNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/AirDateNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/AirDateNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/EpisodeNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/EpisodeNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/EpisodeNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/EpisodeNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/EpisodeTitleNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/EpisodeTitleNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/EpisodeTitleNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/EpisodeTitleNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/MediaInfoNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/MediaInfoNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/MediaInfoNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/MediaInfoNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/OriginalTitleNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/OriginalTitleNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/OriginalTitleNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/OriginalTitleNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/QualityTitleNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/QualityTitleNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/QualityTitleNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/QualityTitleNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/ReleaseGroupNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/ReleaseGroupNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/ReleaseGroupNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/ReleaseGroupNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/SeasonNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/SeasonNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/SeasonNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/SeasonNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/SeparatorNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/SeparatorNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/SeparatorNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/SeparatorNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Naming/Partials/SeriesTitleNamingPartial.html b/src/UI/Settings/MediaManagement/Naming/Partials/SeriesTitleNamingPartial.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Naming/Partials/SeriesTitleNamingPartial.html rename to src/UI/Settings/MediaManagement/Naming/Partials/SeriesTitleNamingPartial.hbs diff --git a/src/UI/Settings/MediaManagement/Permissions/PermissionsViewTemplate.html b/src/UI/Settings/MediaManagement/Permissions/PermissionsViewTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Permissions/PermissionsViewTemplate.html rename to src/UI/Settings/MediaManagement/Permissions/PermissionsViewTemplate.hbs diff --git a/src/UI/Settings/MediaManagement/Sorting/SortingViewTemplate.html b/src/UI/Settings/MediaManagement/Sorting/SortingViewTemplate.hbs similarity index 100% rename from src/UI/Settings/MediaManagement/Sorting/SortingViewTemplate.html rename to src/UI/Settings/MediaManagement/Sorting/SortingViewTemplate.hbs diff --git a/src/UI/Settings/Metadata/MetadataCollectionViewTemplate.html b/src/UI/Settings/Metadata/MetadataCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Metadata/MetadataCollectionViewTemplate.html rename to src/UI/Settings/Metadata/MetadataCollectionViewTemplate.hbs diff --git a/src/UI/Settings/Metadata/MetadataEditViewTemplate.html b/src/UI/Settings/Metadata/MetadataEditViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Metadata/MetadataEditViewTemplate.html rename to src/UI/Settings/Metadata/MetadataEditViewTemplate.hbs diff --git a/src/UI/Settings/Metadata/MetadataItemViewTemplate.html b/src/UI/Settings/Metadata/MetadataItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Metadata/MetadataItemViewTemplate.html rename to src/UI/Settings/Metadata/MetadataItemViewTemplate.hbs diff --git a/src/UI/Settings/Metadata/MetadataLayoutTemplate.html b/src/UI/Settings/Metadata/MetadataLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/Metadata/MetadataLayoutTemplate.html rename to src/UI/Settings/Metadata/MetadataLayoutTemplate.hbs diff --git a/src/UI/Settings/Notifications/Add/NotificationAddCollectionViewTemplate.html b/src/UI/Settings/Notifications/Add/NotificationAddCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/Add/NotificationAddCollectionViewTemplate.html rename to src/UI/Settings/Notifications/Add/NotificationAddCollectionViewTemplate.hbs diff --git a/src/UI/Settings/Notifications/Add/NotificationAddItemViewTemplate.html b/src/UI/Settings/Notifications/Add/NotificationAddItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/Add/NotificationAddItemViewTemplate.html rename to src/UI/Settings/Notifications/Add/NotificationAddItemViewTemplate.hbs diff --git a/src/UI/Settings/Notifications/Delete/NotificationDeleteViewTemplate.html b/src/UI/Settings/Notifications/Delete/NotificationDeleteViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/Delete/NotificationDeleteViewTemplate.html rename to src/UI/Settings/Notifications/Delete/NotificationDeleteViewTemplate.hbs diff --git a/src/UI/Settings/Notifications/Edit/NotificationEditViewTemplate.html b/src/UI/Settings/Notifications/Edit/NotificationEditViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/Edit/NotificationEditViewTemplate.html rename to src/UI/Settings/Notifications/Edit/NotificationEditViewTemplate.hbs diff --git a/src/UI/Settings/Notifications/NotificationCollectionViewTemplate.html b/src/UI/Settings/Notifications/NotificationCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/NotificationCollectionViewTemplate.html rename to src/UI/Settings/Notifications/NotificationCollectionViewTemplate.hbs diff --git a/src/UI/Settings/Notifications/NotificationItemViewTemplate.html b/src/UI/Settings/Notifications/NotificationItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Notifications/NotificationItemViewTemplate.html rename to src/UI/Settings/Notifications/NotificationItemViewTemplate.hbs diff --git a/src/UI/Settings/Profile/DeleteProfileViewTemplate.html b/src/UI/Settings/Profile/DeleteProfileViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/DeleteProfileViewTemplate.html rename to src/UI/Settings/Profile/DeleteProfileViewTemplate.hbs diff --git a/src/UI/Settings/Profile/Edit/EditProfileItemViewTemplate.html b/src/UI/Settings/Profile/Edit/EditProfileItemViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/Edit/EditProfileItemViewTemplate.html rename to src/UI/Settings/Profile/Edit/EditProfileItemViewTemplate.hbs diff --git a/src/UI/Settings/Profile/Edit/EditProfileLayoutTemplate.html b/src/UI/Settings/Profile/Edit/EditProfileLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/Edit/EditProfileLayoutTemplate.html rename to src/UI/Settings/Profile/Edit/EditProfileLayoutTemplate.hbs diff --git a/src/UI/Settings/Profile/Edit/EditProfileViewTemplate.html b/src/UI/Settings/Profile/Edit/EditProfileViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/Edit/EditProfileViewTemplate.html rename to src/UI/Settings/Profile/Edit/EditProfileViewTemplate.hbs diff --git a/src/UI/Settings/Profile/ProfileCollectionTemplate.html b/src/UI/Settings/Profile/ProfileCollectionTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/ProfileCollectionTemplate.html rename to src/UI/Settings/Profile/ProfileCollectionTemplate.hbs diff --git a/src/UI/Settings/Profile/ProfileLayoutTemplate.html b/src/UI/Settings/Profile/ProfileLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/ProfileLayoutTemplate.html rename to src/UI/Settings/Profile/ProfileLayoutTemplate.hbs diff --git a/src/UI/Settings/Profile/ProfileViewTemplate.html b/src/UI/Settings/Profile/ProfileViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Profile/ProfileViewTemplate.html rename to src/UI/Settings/Profile/ProfileViewTemplate.hbs diff --git a/src/UI/Settings/Quality/Definition/QualityDefinitionCollectionTemplate.html b/src/UI/Settings/Quality/Definition/QualityDefinitionCollectionTemplate.hbs similarity index 100% rename from src/UI/Settings/Quality/Definition/QualityDefinitionCollectionTemplate.html rename to src/UI/Settings/Quality/Definition/QualityDefinitionCollectionTemplate.hbs diff --git a/src/UI/Settings/Quality/Definition/QualityDefinitionViewTemplate.html b/src/UI/Settings/Quality/Definition/QualityDefinitionViewTemplate.hbs similarity index 100% rename from src/UI/Settings/Quality/Definition/QualityDefinitionViewTemplate.html rename to src/UI/Settings/Quality/Definition/QualityDefinitionViewTemplate.hbs diff --git a/src/UI/Settings/Quality/QualityLayoutTemplate.html b/src/UI/Settings/Quality/QualityLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/Quality/QualityLayoutTemplate.html rename to src/UI/Settings/Quality/QualityLayoutTemplate.hbs diff --git a/src/UI/Settings/SettingsLayoutTemplate.html b/src/UI/Settings/SettingsLayoutTemplate.hbs similarity index 100% rename from src/UI/Settings/SettingsLayoutTemplate.html rename to src/UI/Settings/SettingsLayoutTemplate.hbs diff --git a/src/UI/Settings/ThingyHeaderGroupViewTemplate.html b/src/UI/Settings/ThingyHeaderGroupViewTemplate.hbs similarity index 100% rename from src/UI/Settings/ThingyHeaderGroupViewTemplate.html rename to src/UI/Settings/ThingyHeaderGroupViewTemplate.hbs diff --git a/src/UI/Settings/UI/UiViewTemplate.html b/src/UI/Settings/UI/UiViewTemplate.hbs similarity index 100% rename from src/UI/Settings/UI/UiViewTemplate.html rename to src/UI/Settings/UI/UiViewTemplate.hbs diff --git a/src/UI/Shared/Grid/JumpToPageTemplate.html b/src/UI/Shared/Grid/JumpToPageTemplate.hbs similarity index 100% rename from src/UI/Shared/Grid/JumpToPageTemplate.html rename to src/UI/Shared/Grid/JumpToPageTemplate.hbs diff --git a/src/UI/Shared/Grid/PagerTemplate.html b/src/UI/Shared/Grid/PagerTemplate.hbs similarity index 100% rename from src/UI/Shared/Grid/PagerTemplate.html rename to src/UI/Shared/Grid/PagerTemplate.hbs diff --git a/src/UI/Shared/LoadingTemplate.html b/src/UI/Shared/LoadingTemplate.hbs similarity index 100% rename from src/UI/Shared/LoadingTemplate.html rename to src/UI/Shared/LoadingTemplate.hbs diff --git a/src/UI/Shared/NotFoundTemplate.html b/src/UI/Shared/NotFoundTemplate.hbs similarity index 100% rename from src/UI/Shared/NotFoundTemplate.html rename to src/UI/Shared/NotFoundTemplate.hbs diff --git a/src/UI/Shared/Toolbar/ButtonTemplate.html b/src/UI/Shared/Toolbar/ButtonTemplate.hbs similarity index 100% rename from src/UI/Shared/Toolbar/ButtonTemplate.html rename to src/UI/Shared/Toolbar/ButtonTemplate.hbs diff --git a/src/UI/Shared/Toolbar/RadioButtonTemplate.html b/src/UI/Shared/Toolbar/RadioButtonTemplate.hbs similarity index 100% rename from src/UI/Shared/Toolbar/RadioButtonTemplate.html rename to src/UI/Shared/Toolbar/RadioButtonTemplate.hbs diff --git a/src/UI/Shared/Toolbar/Sorting/SortingButtonCollectionViewTemplate.html b/src/UI/Shared/Toolbar/Sorting/SortingButtonCollectionViewTemplate.hbs similarity index 100% rename from src/UI/Shared/Toolbar/Sorting/SortingButtonCollectionViewTemplate.html rename to src/UI/Shared/Toolbar/Sorting/SortingButtonCollectionViewTemplate.hbs diff --git a/src/UI/Shared/Toolbar/Sorting/SortingButtonViewTemplate.html b/src/UI/Shared/Toolbar/Sorting/SortingButtonViewTemplate.hbs similarity index 100% rename from src/UI/Shared/Toolbar/Sorting/SortingButtonViewTemplate.html rename to src/UI/Shared/Toolbar/Sorting/SortingButtonViewTemplate.hbs diff --git a/src/UI/Shared/Toolbar/ToolbarLayoutTemplate.html b/src/UI/Shared/Toolbar/ToolbarLayoutTemplate.hbs similarity index 100% rename from src/UI/Shared/Toolbar/ToolbarLayoutTemplate.html rename to src/UI/Shared/Toolbar/ToolbarLayoutTemplate.hbs diff --git a/src/UI/System/Backup/BackupEmptyViewTemplate.html b/src/UI/System/Backup/BackupEmptyViewTemplate.hbs similarity index 100% rename from src/UI/System/Backup/BackupEmptyViewTemplate.html rename to src/UI/System/Backup/BackupEmptyViewTemplate.hbs diff --git a/src/UI/System/Backup/BackupFilenameCellTemplate.html b/src/UI/System/Backup/BackupFilenameCellTemplate.hbs similarity index 100% rename from src/UI/System/Backup/BackupFilenameCellTemplate.html rename to src/UI/System/Backup/BackupFilenameCellTemplate.hbs diff --git a/src/UI/System/Backup/BackupLayoutTemplate.html b/src/UI/System/Backup/BackupLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Backup/BackupLayoutTemplate.html rename to src/UI/System/Backup/BackupLayoutTemplate.hbs diff --git a/src/UI/System/Info/About/AboutViewTemplate.html b/src/UI/System/Info/About/AboutViewTemplate.hbs similarity index 100% rename from src/UI/System/Info/About/AboutViewTemplate.html rename to src/UI/System/Info/About/AboutViewTemplate.hbs diff --git a/src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.html b/src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.html rename to src/UI/System/Info/DiskSpace/DiskSpaceLayoutTemplate.hbs diff --git a/src/UI/System/Info/Health/HealthLayoutTemplate.html b/src/UI/System/Info/Health/HealthLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Info/Health/HealthLayoutTemplate.html rename to src/UI/System/Info/Health/HealthLayoutTemplate.hbs diff --git a/src/UI/System/Info/Health/HealthOkViewTemplate.html b/src/UI/System/Info/Health/HealthOkViewTemplate.hbs similarity index 100% rename from src/UI/System/Info/Health/HealthOkViewTemplate.html rename to src/UI/System/Info/Health/HealthOkViewTemplate.hbs diff --git a/src/UI/System/Info/SystemInfoLayoutTemplate.html b/src/UI/System/Info/SystemInfoLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Info/SystemInfoLayoutTemplate.html rename to src/UI/System/Info/SystemInfoLayoutTemplate.hbs diff --git a/src/UI/System/Logs/Files/ContentsViewTemplate.html b/src/UI/System/Logs/Files/ContentsViewTemplate.hbs similarity index 100% rename from src/UI/System/Logs/Files/ContentsViewTemplate.html rename to src/UI/System/Logs/Files/ContentsViewTemplate.hbs diff --git a/src/UI/System/Logs/Files/LogFileLayoutTemplate.html b/src/UI/System/Logs/Files/LogFileLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Logs/Files/LogFileLayoutTemplate.html rename to src/UI/System/Logs/Files/LogFileLayoutTemplate.hbs diff --git a/src/UI/System/Logs/LogsLayoutTemplate.html b/src/UI/System/Logs/LogsLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Logs/LogsLayoutTemplate.html rename to src/UI/System/Logs/LogsLayoutTemplate.hbs diff --git a/src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html b/src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.hbs similarity index 100% rename from src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html rename to src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.hbs diff --git a/src/UI/System/Logs/Table/LogsTableLayoutTemplate.html b/src/UI/System/Logs/Table/LogsTableLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Logs/Table/LogsTableLayoutTemplate.html rename to src/UI/System/Logs/Table/LogsTableLayoutTemplate.hbs diff --git a/src/UI/System/SystemLayoutTemplate.html b/src/UI/System/SystemLayoutTemplate.hbs similarity index 100% rename from src/UI/System/SystemLayoutTemplate.html rename to src/UI/System/SystemLayoutTemplate.hbs diff --git a/src/UI/System/Update/EmptyViewTemplate.html b/src/UI/System/Update/EmptyViewTemplate.hbs similarity index 100% rename from src/UI/System/Update/EmptyViewTemplate.html rename to src/UI/System/Update/EmptyViewTemplate.hbs diff --git a/src/UI/System/Update/UpdateItemViewTemplate.html b/src/UI/System/Update/UpdateItemViewTemplate.hbs similarity index 100% rename from src/UI/System/Update/UpdateItemViewTemplate.html rename to src/UI/System/Update/UpdateItemViewTemplate.hbs diff --git a/src/UI/System/Update/UpdateLayoutTemplate.html b/src/UI/System/Update/UpdateLayoutTemplate.hbs similarity index 100% rename from src/UI/System/Update/UpdateLayoutTemplate.html rename to src/UI/System/Update/UpdateLayoutTemplate.hbs diff --git a/src/UI/Wanted/ControlsColumnTemplate.html b/src/UI/Wanted/ControlsColumnTemplate.hbs similarity index 100% rename from src/UI/Wanted/ControlsColumnTemplate.html rename to src/UI/Wanted/ControlsColumnTemplate.hbs diff --git a/src/UI/Wanted/Cutoff/CutoffUnmetLayoutTemplate.html b/src/UI/Wanted/Cutoff/CutoffUnmetLayoutTemplate.hbs similarity index 100% rename from src/UI/Wanted/Cutoff/CutoffUnmetLayoutTemplate.html rename to src/UI/Wanted/Cutoff/CutoffUnmetLayoutTemplate.hbs diff --git a/src/UI/Wanted/Missing/MissingLayoutTemplate.html b/src/UI/Wanted/Missing/MissingLayoutTemplate.hbs similarity index 100% rename from src/UI/Wanted/Missing/MissingLayoutTemplate.html rename to src/UI/Wanted/Missing/MissingLayoutTemplate.hbs diff --git a/src/UI/Wanted/WantedLayoutTemplate.html b/src/UI/Wanted/WantedLayoutTemplate.hbs similarity index 100% rename from src/UI/Wanted/WantedLayoutTemplate.html rename to src/UI/Wanted/WantedLayoutTemplate.hbs From 4d23b2cac3d4b44cbdbbf9634d9e5819da2343b9 Mon Sep 17 00:00:00 2001 From: kayone Date: Thu, 28 Aug 2014 14:40:18 -0700 Subject: [PATCH 2/2] switched from grunt to gulp --- Gruntfile.js | 185 ---- build.ps1 | 8 +- gulp/build.js | 13 + gulp/clean.js | 9 + gulp/copy.js | 22 + gulp/gulpFile.js | 11 + gulp/handlebars.js | 57 ++ gulp/jshint.js | 26 + gulp/less.js | 30 + gulp/paths.js | 26 + gulp/pipelines/gulp-bom.js | 4 + gulp/requirejs.js | 32 + gulp/stripBom.js | 25 + gulp/watch.js | 30 + gulpFile.js | 1 + package.json | 28 +- .../Overrides/bootstrap.toggle-switch.less | 4 +- .../backbone.marionette.templates.js | 9 +- src/UI/JsLibraries/handlebars.runtime.js | 850 +++++++++++------- src/UI/JsLibraries/handlebars.runtime.min.js | 27 + src/UI/Shared/Shims/handlebars.js | 6 + src/UI/app.js | 2 +- src/UI/index.html | 17 +- 23 files changed, 861 insertions(+), 561 deletions(-) delete mode 100644 Gruntfile.js create mode 100644 gulp/build.js create mode 100644 gulp/clean.js create mode 100644 gulp/copy.js create mode 100644 gulp/gulpFile.js create mode 100644 gulp/handlebars.js create mode 100644 gulp/jshint.js create mode 100644 gulp/less.js create mode 100644 gulp/paths.js create mode 100644 gulp/pipelines/gulp-bom.js create mode 100644 gulp/requirejs.js create mode 100644 gulp/stripBom.js create mode 100644 gulp/watch.js create mode 100644 gulpFile.js create mode 100644 src/UI/JsLibraries/handlebars.runtime.min.js create mode 100644 src/UI/Shared/Shims/handlebars.js diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index df1a59a51..000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,185 +0,0 @@ -module.exports = function (grunt) { - 'use strict'; - - var outputRoot = '_output/'; - var outputDir = outputRoot +'UI/'; - var srcRoot = 'src/UI/'; - var srcContent = srcRoot + 'Content/'; - var destContent = outputDir + 'Content/'; - - grunt.initConfig({ - - pkg: grunt.file.readJSON('package.json'), - - clean: { - output: outputDir, - scripts: [ outputDir + '/**.js','!_output/UI/**/templates.js'] - }, - - less : { - - options:{ - dumpLineNumbers : 'false', - compress : true, - yuicompress : false, - ieCompat : true, - strictImports : true - }, - - bootstrap: { - src : srcContent + 'bootstrap.less', - dest: destContent + 'bootstrap.css' - }, - general : { - cwd : srcRoot, - expand : true, - src :[ - 'Content/theme.less', - 'Content/overrides.less', - 'Series/series.less', - 'History/history.less', - 'AddSeries/addSeries.less', - 'Calendar/calendar.less', - 'Cells/cells.less', - 'Settings/settings.less', - 'System/Logs/logs.less', - 'System/Update/update.less' - ], - dest : outputDir, - ext: '.css' - } - }, - - handlebars: { - options: { - namespace : 'T', - partialRegex: /Partial.hbs/, - wrapped : true, - amd : true, - processName: function (fileName) { - return fileName - .replace(srcRoot, '') - .replace('.hbs', '') - .toLowerCase(); - } - }, - files : { - src : [ srcRoot + '**/*Template.hbs', srcRoot + '**/*Partial.hbs'], - dest: outputDir + 'templates.js' - } - }, - - copy: { - content: { - cwd : srcRoot, - expand: true, - src : [ - 'index.html', - '**/*.css', - '**/*.png', - '**/*.jpg', - '**/*.ico', - '**/*.swf', - '**/FontAwesome/*.*', - '**/fonts/*.*' - ], - dest : outputDir - }, - scripts: { - cwd : srcRoot, - expand: true, - src : [ - '**/*.js' - ], - dest : outputDir - } - }, - - jshint: { - options: { - '-W030': false, - '-W064': false, - '-W097': false, - '-W100': false, - 'undef': true, - 'globals': { - 'require': true, - 'define': true, - 'window': true, - 'document': true, - 'console': true - } - }, - all: [ - srcRoot + '**/*.js', - '!**/JsLibraries/*.js' - ] - }, - - requirejs: { - compile:{ - options: { - mainConfigFile: 'src/UI/app.js', - fileExclusionRegExp: /^.*\.(?!js$)[^.]+$/, - preserveLicenseComments: false, - dir: outputDir, - optimize: 'none', - removeCombined: true, - inlineText: false, - keepBuildDir : true, - modules: [{ - name: 'app', - exclude: ['templates.js'] - }] - } - } - }, - - watch: { - options: { - nospawn: false - }, - bootstrap : { - files: [ srcContent + 'Bootstrap/**', srcContent + 'FontAwesome/**', srcContent + 'bootstrap.less'], - tasks: ['less:bootstrap','less:general'] - }, - generalLess: { - files: [ srcRoot + '**/*.less', '!**/Bootstrap/**', '!**/FontAwesome/**', '!' + srcContent + '/bootstrap.less'], - tasks: ['less:general'] - }, - handlebars : { - files: '<%= handlebars.files.src %>', - tasks: ['handlebars'] - }, - content : { - files: [ - srcRoot + '**/index.html', - srcRoot + '**/*.css', - srcRoot + '**/*.png', - srcRoot + '**/*.jpg', - srcRoot + '**/*.ico', - srcRoot + '**/FontAwesome/*.*', - srcRoot + '**/fonts/*.*' - ], - tasks: ['copy:content'] - }, - scripts: { - files: '<%= copy.scripts.cwd %><%= copy.scripts.src %>', - tasks: ['copy:scripts'] - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-handlebars'); - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-notify'); - grunt.loadNpmTasks('grunt-contrib-requirejs'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - - grunt.registerTask('package', ['clean:output', 'jshint', 'handlebars', 'copy', 'less']); - grunt.registerTask('packagerjs', ['clean:output','jshint', 'handlebars', 'requirejs', 'copy:content', 'less']); - grunt.registerTask('default', ['package', 'watch']); -}; diff --git a/build.ps1 b/build.ps1 index 316fc60e8..ffd2e343e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -191,17 +191,17 @@ Function PackageTests() Function RunGrunt() { - Write-Host "##teamcity[progressStart 'Running Grunt']" - $gruntPath = [environment]::getfolderpath("applicationdata") + '\npm\node_modules\grunt-cli\bin\grunt' + Write-Host "##teamcity[progressStart 'Running Gulp']" + $gulpPath = '.\node_modules\gulp\bin\gulp' Invoke-Expression 'npm install' CheckExitCode - Invoke-Expression ('node ' + $gruntPath + ' packagerjs') -ErrorAction Continue -Verbose + Invoke-Expression ('node ' + $gulpPath + ' build') -ErrorAction Continue -Verbose CheckExitCode Remove-Item $outputFolder\UI\build.txt -ErrorAction Continue - Write-Host "##teamcity[progressFinish 'Running Grunt']" + Write-Host "##teamcity[progressFinish 'Running Gulp']" } Function CheckExitCode() diff --git a/gulp/build.js b/gulp/build.js new file mode 100644 index 000000000..aa519f453 --- /dev/null +++ b/gulp/build.js @@ -0,0 +1,13 @@ +var gulp = require('gulp'); +var runSequence = require('run-sequence'); + +require('./clean'); +require('./requirejs'); +require('./less'); +require('./handlebars'); +require('./copy'); + +gulp.task('build', function () { + return runSequence('clean', + ['requireJs', 'less', 'handlebars', 'copyIndex', 'copyContent']); +}); \ No newline at end of file diff --git a/gulp/clean.js b/gulp/clean.js new file mode 100644 index 000000000..7d68e0faa --- /dev/null +++ b/gulp/clean.js @@ -0,0 +1,9 @@ +var gulp = require('gulp'); +var clean = require('gulp-clean'); + +var paths = require('./paths'); + +gulp.task('clean', function () { + return gulp.src(paths.dest.root, {read: false}) + .pipe(clean()); +}); diff --git a/gulp/copy.js b/gulp/copy.js new file mode 100644 index 000000000..120bc5529 --- /dev/null +++ b/gulp/copy.js @@ -0,0 +1,22 @@ +var gulp = require('gulp'); +var print = require('gulp-print'); +var cache = require('gulp-cached'); + +var paths = require('./paths.js'); + +gulp.task('copyJs', function () { + return gulp.src([paths.src.scripts]) + .pipe(cache()) + .pipe(gulp.dest(paths.dest.root)); +}); + +gulp.task('copyIndex', function () { + return gulp.src(paths.src.index) + .pipe(cache()) + .pipe(gulp.dest(paths.dest.root)); +}); + +gulp.task('copyContent', function () { + return gulp.src([paths.src.content + '**/*.*', '!**/*.less']) + .pipe(gulp.dest(paths.dest.content)); +}); \ No newline at end of file diff --git a/gulp/gulpFile.js b/gulp/gulpFile.js new file mode 100644 index 000000000..05279f7ca --- /dev/null +++ b/gulp/gulpFile.js @@ -0,0 +1,11 @@ +require('./watch.js'); +require('./build.js'); +require('./clean.js'); +require('./requirejs.js'); +require('./jshint.js'); +require('./handlebars.js'); +require('./copy.js'); +require('./less.js'); +require('./stripBom.js'); + + diff --git a/gulp/handlebars.js b/gulp/handlebars.js new file mode 100644 index 000000000..4534d52cf --- /dev/null +++ b/gulp/handlebars.js @@ -0,0 +1,57 @@ +var gulp = require('gulp'); +var handlebars = require('gulp-handlebars'); +var declare = require('gulp-declare'); +var concat = require('gulp-concat'); +var wrapAmd = require('gulp-wrap-amd'); +var wrap = require("gulp-wrap"); +var path = require('path'); +var streamqueue = require('streamqueue'); + +var paths = require('./paths.js'); +var bom = require('./pipelines/gulp-bom.js'); + +gulp.task('handlebars', function () { + + var coreStream = gulp.src([paths.src.templates, '!*/**/*Partial.*']) + .pipe(bom()) + .pipe(handlebars()) + .pipe(declare({ + namespace: 'T', + noRedeclare: true, + processName: function (filePath) { + + filePath = path.relative(paths.src.root, filePath); + + return filePath.replace(/\\/g, '/') + .toLocaleLowerCase() + .replace('template', '') + .replace('.js', ''); + } + })); + + var partialStream = gulp.src([paths.src.partials]) + .pipe(bom()) + .pipe(handlebars()) + .pipe(wrap('Handlebars.template(<%= contents %>)')) + .pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, <%= contents %>)', {}, { + imports: { + processPartialName: function (fileName) { + return JSON.stringify( + path.basename(fileName, '.js') + ); + } + } + })); + + + return streamqueue({ objectMode: true }, + partialStream, + coreStream + ).pipe(concat('templates.js')) + .pipe(wrapAmd({ + deps: ['handlebars'], + params: ['Handlebars'], + exports: 'this["T"]' + })) + .pipe(gulp.dest(paths.dest.root)); +}); diff --git a/gulp/jshint.js b/gulp/jshint.js new file mode 100644 index 000000000..16e5c8ee7 --- /dev/null +++ b/gulp/jshint.js @@ -0,0 +1,26 @@ +var gulp = require('gulp'); +var jshint = require('gulp-jshint'); +var stylish = require('jshint-stylish'); +var cache = require('gulp-cached'); +var paths = require('./paths.js'); + + +gulp.task('jshint', function () { + return gulp.src([paths.src.scripts, paths.src.exclude.libs]) + .pipe(cache()) + .pipe(jshint({ + '-W030': false, + '-W064': false, + '-W097': false, + '-W100': false, + 'undef': true, + 'globals': { + 'require': true, + 'define': true, + 'window': true, + 'document': true, + 'console': true + } + })) + .pipe(jshint.reporter(stylish)); +}); \ No newline at end of file diff --git a/gulp/less.js b/gulp/less.js new file mode 100644 index 000000000..b6088008a --- /dev/null +++ b/gulp/less.js @@ -0,0 +1,30 @@ +var gulp = require('gulp'); +var less = require('gulp-less'); +var print = require('gulp-print'); + +var paths = require('./paths'); + +gulp.task('less', function () { + return gulp.src([ + paths.src.content + 'bootstrap.less', + paths.src.content + 'theme.less', + paths.src.content + 'overrides.less', + paths.src.root + 'Series/series.less', + paths.src.root + 'History/history.less', + paths.src.root + 'AddSeries/addSeries.less', + paths.src.root + 'Calendar/calendar.less', + paths.src.root + 'Cells/cells.less', + paths.src.root + 'Settings/settings.less', + paths.src.root + 'System/Logs/logs.less', + paths.src.root + 'System/Update/update.less', + ]) + .pipe(print()) + .pipe(less({ + dumpLineNumbers: 'false', + compress: true, + yuicompress: true, + ieCompat: true, + strictImports: true + })) + .pipe(gulp.dest(paths.dest.content)); +}); \ No newline at end of file diff --git a/gulp/paths.js b/gulp/paths.js new file mode 100644 index 000000000..52a8e6c8d --- /dev/null +++ b/gulp/paths.js @@ -0,0 +1,26 @@ +module.exports = { + js: [ + './app/**/*.js', + './src/**/*.js', + '!./**/libs/**', + '!./**/vendor/**', + '!./**/templates.js' + ], + + src: { + root: './src/UI/', + templates: './src/UI/**/*.hbs', + index: './src/UI/index.html', + partials: './src/UI/**/*Partial.hbs', + scripts: './src/UI/**/*.js', + less: ['./src/UI/**/*.less'], + content: './src/UI/Content/', + exclude :{ + libs:'!./src/UI/JsLibraries/**' + } + }, + dest: { + root: './_output/UI/', + content: './_output/UI/Content/' + } +}; \ No newline at end of file diff --git a/gulp/pipelines/gulp-bom.js b/gulp/pipelines/gulp-bom.js new file mode 100644 index 000000000..af6136443 --- /dev/null +++ b/gulp/pipelines/gulp-bom.js @@ -0,0 +1,4 @@ +var replace = require('gulp-replace'); +module.exports = function() { + return replace(/^\uFEFF/, ''); +}; \ No newline at end of file diff --git a/gulp/requirejs.js b/gulp/requirejs.js new file mode 100644 index 000000000..75ffd227e --- /dev/null +++ b/gulp/requirejs.js @@ -0,0 +1,32 @@ +var gulp = require('gulp'); +var requirejs = require('requirejs'); +var paths = require('./paths'); + +require('./handlebars.js'); +require('./jshint.js'); + + +gulp.task('requireJs', ['jshint'], function (cb) { + + var config = { + mainConfigFile: 'src/UI/app.js', + fileExclusionRegExp: /^.*\.(?!js$)[^.]+$/, + preserveLicenseComments: false, + dir: paths.dest.root, + optimize: 'none', + removeCombined: true, + inlineText: false, + keepBuildDir: true, + modules: [ + { + name: 'app', + exclude: ['templates.js'] + } + ]}; + + requirejs.optimize(config, function (buildResponse) { + console.log(buildResponse); + cb(); + }); + +}); diff --git a/gulp/stripBom.js b/gulp/stripBom.js new file mode 100644 index 000000000..b2ca39f2c --- /dev/null +++ b/gulp/stripBom.js @@ -0,0 +1,25 @@ +var gulp = require('gulp'); +var paths = require('./paths.js'); +var bom = require('./pipelines/gulp-bom.js'); +var gulpPrint = require('gulp-print'); + + +var stripBom = function (dest) { + gulp.src([paths.src.root, paths.src.exclude.libs]) + .pipe(bom()) + .pipe(gulpPrint(function (filepath) { + return "booming: " + filepath; + })) + .pipe(gulp.dest(dest)); + + gulp.src(paths.src.templates) + .pipe(bom()) + .pipe(gulpPrint(function (filepath) { + return "booming: " + filepath; + })) + .pipe(gulp.dest(dest)); +}; + +gulp.task('stripBom', function () { + stripBom(paths.src.root); +}); diff --git a/gulp/watch.js b/gulp/watch.js new file mode 100644 index 000000000..809c84936 --- /dev/null +++ b/gulp/watch.js @@ -0,0 +1,30 @@ +var gulp = require('gulp'); +//var livereload = require('gulp-livereload'); + + +var paths = require('./paths.js'); + +require('./jshint.js'); +require('./handlebars.js'); +require('./less.js'); +require('./copy.js'); + + +gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs'], function () { + gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']); + gulp.watch(paths.src.templates, ['handlebars']); + gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']); + gulp.watch([paths.src.index], ['copyIndex']); + gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']); +}); + +gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'copyJs'], function () { + var server = livereload(); + gulp.watch([ + 'app/**/*.js', + 'app/**/*.css', + 'app/index.html' + ]).on('change', function (file) { + server.changed(file.path); + }); +}); \ No newline at end of file diff --git a/gulpFile.js b/gulpFile.js new file mode 100644 index 000000000..0a9c8c19f --- /dev/null +++ b/gulpFile.js @@ -0,0 +1 @@ +require('./gulp/gulpfile.js'); diff --git a/package.json b/package.json index 03f1da66d..150d04b90 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "NZBDrone", "main": "index.js", "scripts": { - "preinstall": "npm install grunt-cli -g" + "preinstall": "" }, "repository": { "type": "git", @@ -15,14 +15,22 @@ "gitHead": "9ff7aa1bf7fe38c4c5bdb92f56c8ad556916ed67", "readmeFilename": "readme.md", "dependencies": { - "grunt": "*", - "grunt-contrib-handlebars": "*", - "grunt-contrib-watch": "*", - "grunt-contrib-less": "0.8.3", - "grunt-contrib-copy": "*", - "grunt-notify": "*", - "grunt-contrib-clean": "*", - "grunt-contrib-requirejs": "*", - "grunt-contrib-jshint": "*" + "gulp": "^3.8.7", + "gulp-handlebars": "^2.2.0", + "gulp-declare": "^0.3.0", + "gulp-clean": "^0.3.1", + "gulp-concat": "^2.3.4", + "gulp-wrap-amd": "^0.3.1", + "gulp-wrap": "^0.3.0", + "streamqueue": "^0.1.1", + "gulp-replace": "^0.4.0", + "fs-extra": "^0.11.0", + "gulp-print": "^1.1.0", + "gulp-less": "^1.3.5", + "gulp-jshint": "^1.8.4", + "gulp-cached": "^1.0.1", + "jshint-stylish": "^0.4.0", + "requirejs": "^2.1.14", + "run-sequence": "^0.3.6" } } diff --git a/src/UI/Content/Overrides/bootstrap.toggle-switch.less b/src/UI/Content/Overrides/bootstrap.toggle-switch.less index 762656bb8..50c57065b 100644 --- a/src/UI/Content/Overrides/bootstrap.toggle-switch.less +++ b/src/UI/Content/Overrides/bootstrap.toggle-switch.less @@ -1,5 +1,5 @@ -@import "Bootstrap/variables"; -@import "Bootstrap/mixins"; +@import "../Bootstrap/variables"; +@import "../Bootstrap/mixins"; .toggle { height: 34px; diff --git a/src/UI/Handlebars/backbone.marionette.templates.js b/src/UI/Handlebars/backbone.marionette.templates.js index 69d72c4ed..825474da0 100644 --- a/src/UI/Handlebars/backbone.marionette.templates.js +++ b/src/UI/Handlebars/backbone.marionette.templates.js @@ -2,6 +2,7 @@ define( [ 'templates', + 'handlebars', 'handlebars.helpers', 'Handlebars/Helpers/DateTime', 'Handlebars/Helpers/Html', @@ -13,11 +14,10 @@ define( 'Handlebars/Helpers/EachReverse', 'Handlebars/Helpers/String', 'Handlebars/Handlebars.Debug' - ], function (Templates) { + ], function (Templates, Handlebars) { return function () { this.get = function (templateId) { - - var templateKey = templateId.toLowerCase(); + var templateKey = templateId.toLowerCase().replace('template', ''); var templateFunction = Templates[templateKey]; @@ -28,7 +28,8 @@ define( return function (data) { try { - return templateFunction(data); + var wrappedTemplate = Handlebars.template.call(Handlebars, templateFunction); + return wrappedTemplate(data); } catch (error) { console.error('template render failed for ' + templateKey + ' ' + error); diff --git a/src/UI/JsLibraries/handlebars.runtime.js b/src/UI/JsLibraries/handlebars.runtime.js index fac2cc5a4..708c42fe2 100644 --- a/src/UI/JsLibraries/handlebars.runtime.js +++ b/src/UI/JsLibraries/handlebars.runtime.js @@ -1,374 +1,530 @@ -/* +/*! -Copyright (C) 2011 by Yehuda Katz + handlebars v1.3.0 -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Copyright (C) 2011 by Yehuda Katz -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. -@license -*/ + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. -// lib/handlebars/browser-prefix.js -(function(undefined) { - var Handlebars = {}; -; -// lib/handlebars/base.js - -Handlebars.VERSION = "1.0.0"; -Handlebars.COMPILER_REVISION = 4; - -Handlebars.REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '>= 1.0.0' -}; - -Handlebars.helpers = {}; -Handlebars.partials = {}; - -var toString = Object.prototype.toString, - functionType = '[object Function]', - objectType = '[object Object]'; - -Handlebars.registerHelper = function(name, fn, inverse) { - if (toString.call(name) === objectType) { - if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); } - Handlebars.Utils.extend(this.helpers, name); - } else { - if (inverse) { fn.not = inverse; } - this.helpers[name] = fn; - } -}; - -Handlebars.registerPartial = function(name, str) { - if (toString.call(name) === objectType) { - Handlebars.Utils.extend(this.partials, name); - } else { - this.partials[name] = str; - } -}; - -Handlebars.registerHelper('helperMissing', function(arg) { - if(arguments.length === 2) { - return undefined; - } else { - throw new Error("Missing helper: '" + arg + "'"); - } -}); - -Handlebars.registerHelper('blockHelperMissing', function(context, options) { - var inverse = options.inverse || function() {}, fn = options.fn; - - var type = toString.call(context); - - if(type === functionType) { context = context.call(this); } - - if(context === true) { - return fn(this); - } else if(context === false || context == null) { - return inverse(this); - } else if(type === "[object Array]") { - if(context.length > 0) { - return Handlebars.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - return fn(context); - } -}); - -Handlebars.K = function() {}; - -Handlebars.createFrame = Object.create || function(object) { - Handlebars.K.prototype = object; - var obj = new Handlebars.K(); - Handlebars.K.prototype = null; - return obj; -}; - -Handlebars.logger = { - DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, - - methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'}, - - // can be overridden in the host environment - log: function(level, obj) { - if (Handlebars.logger.level <= level) { - var method = Handlebars.logger.methodMap[level]; - if (typeof console !== 'undefined' && console[method]) { - console[method].call(console, obj); - } - } - } -}; - -Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); }; - -Handlebars.registerHelper('each', function(context, options) { - var fn = options.fn, inverse = options.inverse; - var i = 0, ret = "", data; - - var type = toString.call(context); - if(type === functionType) { context = context.call(this); } - - if (options.data) { - data = Handlebars.createFrame(options.data); - } - - if(context && typeof context === 'object') { - if(context instanceof Array){ - for(var j = context.length; i": ">", + '"': """, + "'": "'", + "`": "`" + }; -Handlebars.registerHelper('unless', function(conditional, options) { - return Handlebars.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn}); -}); + var badChars = /[&<>"'`]/g; + var possible = /[&<>"'`]/; -Handlebars.registerHelper('with', function(context, options) { - var type = toString.call(context); - if(type === functionType) { context = context.call(this); } - - if (!Handlebars.Utils.isEmpty(context)) return options.fn(context); -}); - -Handlebars.registerHelper('log', function(context, options) { - var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; - Handlebars.log(level, context); -}); -; -// lib/handlebars/utils.js - -var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - -Handlebars.Exception = function(message) { - var tmp = Error.prototype.constructor.apply(this, arguments); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } -}; -Handlebars.Exception.prototype = new Error(); - -// Build out our basic SafeString type -Handlebars.SafeString = function(string) { - this.string = string; -}; -Handlebars.SafeString.prototype.toString = function() { - return this.string.toString(); -}; - -var escape = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" -}; - -var badChars = /[&<>"'`]/g; -var possible = /[&<>"'`]/; - -var escapeChar = function(chr) { - return escape[chr] || "&"; -}; - -Handlebars.Utils = { - extend: function(obj, value) { - for(var key in value) { - if(value.hasOwnProperty(key)) { - obj[key] = value[key]; - } - } - }, - - escapeExpression: function(string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof Handlebars.SafeString) { - return string.toString(); - } else if (string == null || string === false) { - return ""; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = string.toString(); - - if(!possible.test(string)) { return string; } - return string.replace(badChars, escapeChar); - }, - - isEmpty: function(value) { - if (!value && value !== 0) { - return true; - } else if(toString.call(value) === "[object Array]" && value.length === 0) { - return true; - } else { - return false; - } - } -}; -; -// lib/handlebars/runtime.js - -Handlebars.VM = { - template: function(templateSpec) { - // Just add water - var container = { - escapeExpression: Handlebars.Utils.escapeExpression, - invokePartial: Handlebars.VM.invokePartial, - programs: [], - program: function(i, fn, data) { - var programWrapper = this.programs[i]; - if(data) { - programWrapper = Handlebars.VM.program(i, fn, data); - } else if (!programWrapper) { - programWrapper = this.programs[i] = Handlebars.VM.program(i, fn); + function escapeChar(chr) { + return escape[chr] || "&"; } - return programWrapper; - }, - merge: function(param, common) { - var ret = param || common; - if (param && common) { - ret = {}; - Handlebars.Utils.extend(ret, common); - Handlebars.Utils.extend(ret, param); + function extend(obj, value) { + for(var key in value) { + if(Object.prototype.hasOwnProperty.call(value, key)) { + obj[key] = value[key]; + } + } } - return ret; - }, - programWithDepth: Handlebars.VM.programWithDepth, - noop: Handlebars.VM.noop, - compilerInfo: null - }; - return function(context, options) { - options = options || {}; - var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data); - - var compilerInfo = container.compilerInfo || [], - compilerRevision = compilerInfo[0] || 1, - currentRevision = Handlebars.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision], - compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision]; - throw "Template was precompiled with an older version of Handlebars than the current runtime. "+ - "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+")."; - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+ - "Please update your runtime to a newer version ("+compilerInfo[1]+")."; + __exports__.extend = extend;var toString = Object.prototype.toString; + __exports__.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + var isFunction = function(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + if (isFunction(/x/)) { + isFunction = function(value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; } - } + var isFunction; + __exports__.isFunction = isFunction; + var isArray = Array.isArray || function(value) { + return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; + }; + __exports__.isArray = isArray; - return result; - }; - }, + function escapeExpression(string) { + // don't escape SafeStrings, since they're already safe + if (string instanceof SafeString) { + return string.toString(); + } else if (!string && string !== 0) { + return ""; + } - programWithDepth: function(i, fn, data /*, $depth */) { - var args = Array.prototype.slice.call(arguments, 3); + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = "" + string; - var program = function(context, options) { - options = options || {}; + if(!possible.test(string)) { return string; } + return string.replace(badChars, escapeChar); + } - return fn.apply(this, [context, options.data || data].concat(args)); - }; - program.program = i; - program.depth = args.length; - return program; - }, - program: function(i, fn, data) { - var program = function(context, options) { - options = options || {}; + __exports__.escapeExpression = escapeExpression;function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } - return fn(context, options.data || data); - }; - program.program = i; - program.depth = 0; - return program; - }, - noop: function() { return ""; }, - invokePartial: function(partial, name, context, helpers, partials, data) { - var options = { helpers: helpers, partials: partials, data: data }; + __exports__.isEmpty = isEmpty; + return __exports__; + })(__module3__); - if(partial === undefined) { - throw new Handlebars.Exception("The partial " + name + " could not be found"); - } else if(partial instanceof Function) { - return partial(context, options); - } else if (!Handlebars.compile) { - throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); - } else { - partials[name] = Handlebars.compile(partial, {data: data !== undefined}); - return partials[name](context, options); - } - } -}; +// handlebars/exception.js + var __module4__ = (function() { + "use strict"; + var __exports__; -Handlebars.template = Handlebars.VM.template; -; -// lib/handlebars/browser-suffix.js - if (typeof module === 'object' && module.exports) { - // CommonJS - module.exports = Handlebars; + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - } else if (typeof define === "function" && define.amd) { - // AMD modules - define(function() { return Handlebars; }); + function Exception(message, node) { + var line; + if (node && node.firstLine) { + line = node.firstLine; - } else { - // other, i.e. browser - this.Handlebars = Handlebars; - } -}).call(this); -; + message += ' - ' + line + ':' + node.firstColumn; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + if (line) { + this.lineNumber = line; + this.column = node.firstColumn; + } + } + + Exception.prototype = new Error(); + + __exports__ = Exception; + return __exports__; + })(); + +// handlebars/base.js + var __module1__ = (function(__dependency1__, __dependency2__) { + "use strict"; + var __exports__ = {}; + var Utils = __dependency1__; + var Exception = __dependency2__; + + var VERSION = "1.3.0"; + __exports__.VERSION = VERSION;var COMPILER_REVISION = 4; + __exports__.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '>= 1.0.0' + }; + __exports__.REVISION_CHANGES = REVISION_CHANGES; + var isArray = Utils.isArray, + isFunction = Utils.isFunction, + toString = Utils.toString, + objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials) { + this.helpers = helpers || {}; + this.partials = partials || {}; + + registerDefaultHelpers(this); + } + + __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: logger, + log: log, + + registerHelper: function(name, fn, inverse) { + if (toString.call(name) === objectType) { + if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); } + Utils.extend(this.helpers, name); + } else { + if (inverse) { fn.not = inverse; } + this.helpers[name] = fn; + } + }, + + registerPartial: function(name, str) { + if (toString.call(name) === objectType) { + Utils.extend(this.partials, name); + } else { + this.partials[name] = str; + } + } + }; + + function registerDefaultHelpers(instance) { + instance.registerHelper('helperMissing', function(arg) { + if(arguments.length === 2) { + return undefined; + } else { + throw new Exception("Missing helper: '" + arg + "'"); + } + }); + + instance.registerHelper('blockHelperMissing', function(context, options) { + var inverse = options.inverse || function() {}, fn = options.fn; + + if (isFunction(context)) { context = context.call(this); } + + if(context === true) { + return fn(this); + } else if(context === false || context == null) { + return inverse(this); + } else if (isArray(context)) { + if(context.length > 0) { + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + return fn(context); + } + }); + + instance.registerHelper('each', function(context, options) { + var fn = options.fn, inverse = options.inverse; + var i = 0, ret = "", data; + + if (isFunction(context)) { context = context.call(this); } + + if (options.data) { + data = createFrame(options.data); + } + + if(context && typeof context === 'object') { + if (isArray(context)) { + for(var j = context.length; i":">",'"':""","'":"'","`":"`"},i=/[&<>"'`]/g,j=/[&<>"'`]/;f.extend=c;var k=Object.prototype.toString;f.toString=k;var l=function(a){return"function"==typeof a};l(/x/)&&(l=function(a){return"function"==typeof a&&"[object Function]"===k.call(a)});var l;f.isFunction=l;var m=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===k.call(a):!1};return f.isArray=m,f.escapeExpression=d,f.isEmpty=e,f}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d=b.fn,e=b.inverse,f=0,g="";if(m(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(l(a))for(var h=a.length;h>f;f++)c&&(c.index=f,c.first=0===f,c.last=f===a.length-1),g+=d(a[f],{data:c});else for(var i in a)a.hasOwnProperty(i)&&(c&&(c.key=i,c.index=f,c.first=0===f),g+=d(a[i],{data:c}),f++);return 0===f&&(g=e(this)),g}),a.registerHelper("if",function(a,b){return m(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||g.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return m(a)&&(a=a.call(this)),g.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function e(a,b){p.log(a,b)}var f={},g=a,h=b,i="1.3.0";f.VERSION=i;var j=4;f.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};f.REVISION_CHANGES=k;var l=g.isArray,m=g.isFunction,n=g.toString,o="[object Object]";f.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:p,log:e,registerHelper:function(a,b,c){if(n.call(a)===o){if(c||b)throw new h("Arg not supported with multiple helpers");g.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){n.call(a)===o?g.extend(this.partials,a):this.partials[a]=b}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(p.level<=a){var c=p.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};f.logger=p,f.log=e;var q=function(a){var b={};return g.extend(b,a),b};return f.createFrame=q,f}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");var c=function(a,c,d,e,f,g){var h=b.VM.invokePartial.apply(this,arguments);if(null!=h)return h;if(b.compile){var i={helpers:e,partials:f,data:g};return f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,i)}throw new l("The partial "+c+" could not be compiled when running in runtime-only mode")},d={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=g(a,b,c):d||(d=this.programs[a]=g(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(c,e){e=e||{};var f,g,h=e.partial?e:b;e.partial||(f=e.helpers,g=e.partials);var i=a.call(d,h,c,f,g,e.data);return e.partial||b.VM.checkRevision(d.compilerInfo),i}}function f(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function g(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function h(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function i(){return""}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;return j.checkRevision=d,j.template=e,j.programWithDepth=f,j.program=g,j.invokePartial=h,j.noop=i,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,f=m}(d,a,c,b,e);return f}(); \ No newline at end of file diff --git a/src/UI/Shared/Shims/handlebars.js b/src/UI/Shared/Shims/handlebars.js new file mode 100644 index 000000000..b36916fbf --- /dev/null +++ b/src/UI/Shared/Shims/handlebars.js @@ -0,0 +1,6 @@ +define([], function () { + + 'use strict'; + + return window.Handlebars; +}); \ No newline at end of file diff --git a/src/UI/app.js b/src/UI/app.js index cdec34b7c..4d8691952 100644 --- a/src/UI/app.js +++ b/src/UI/app.js @@ -5,7 +5,7 @@ require.config({ 'backbone' : 'JsLibraries/backbone', 'moment' : 'JsLibraries/moment', 'filesize' : 'JsLibraries/filesize', - 'handlebars' : 'JsLibraries/handlebars.runtime', + 'handlebars' : 'Shared/Shims/handlebars', 'handlebars.helpers' : 'JsLibraries/handlebars.helpers', 'bootstrap' : 'JsLibraries/bootstrap', 'backbone.deepmodel' : 'JsLibraries/backbone.deep.model', diff --git a/src/UI/index.html b/src/UI/index.html index 6ced33e35..f1542fcff 100644 --- a/src/UI/index.html +++ b/src/UI/index.html @@ -13,14 +13,14 @@ - - - - - - - - + + + + + + + + @@ -80,6 +80,7 @@ +