├── README.md ├── gulpfile.js ├── js_cms ├── _cms │ ├── LICENSE.txt │ ├── backup.php │ ├── blank.html │ ├── check.php │ ├── css │ │ ├── cms.css │ │ └── libs.css │ ├── directory.php │ ├── embed.php │ ├── favicon.ico │ ├── grid │ │ ├── css │ │ │ └── grid.css │ │ ├── favicon.ico │ │ ├── grid_body.html │ │ ├── grid_setting.js │ │ ├── grid_sitemap.txt │ │ ├── images │ │ │ ├── grid_controllpanel_bg.png │ │ │ ├── grid_controllpanel_bg_ng.png │ │ │ ├── grid_controllpanel_ss.png │ │ │ ├── grid_grid.png │ │ │ ├── grid_revalpanel_bg.png │ │ │ └── grid_revalpanel_bg_ng.png │ │ ├── index.html │ │ └── js │ │ │ ├── grid.js │ │ │ └── grid_body.js │ ├── images │ │ ├── bg_dragbar.png │ │ ├── bg_grid.png │ │ ├── bg_mock.png │ │ ├── bg_shadow.png │ │ ├── bg_shaow_h.png │ │ ├── btn_closes.png │ │ ├── btn_select_bg.png │ │ ├── colorlist.png │ │ ├── css_copy_bg.png │ │ ├── custom_bg_a.jpg │ │ ├── custom_bg_b.png │ │ ├── guide_rep.png │ │ ├── icon_dirs.png │ │ ├── icon_intro.png │ │ ├── icon_tree.png │ │ ├── icon_tree2.png │ │ ├── ss_add.png │ │ ├── ss_add_image.png │ │ ├── ss_file.png │ │ ├── ss_gadget.png │ │ ├── ss_mylist.png │ │ ├── ss_mylist_ac.png │ │ └── ss_target.png │ ├── index.html │ ├── js │ │ ├── cms.free.js │ │ ├── cms.js │ │ ├── codes.xml │ │ └── libs.js │ ├── login.php │ ├── setting │ │ ├── setting.js │ │ └── setting.php │ ├── storage.funcs.php │ ├── storage.login.php │ ├── storage.php │ └── upload.php ├── contact.html ├── html │ ├── _cms_preview.html │ ├── _json │ │ ├── _html_.company.json │ │ ├── _html_.news.json │ │ ├── _html_.news_20150101.json │ │ ├── _html_.news_20150202.json │ │ ├── _html_.news_20150303.json │ │ ├── _html_.news_20150404.json │ │ ├── _html_.news_20150505.json │ │ ├── _html_.products.json │ │ ├── _html_.recruit.json │ │ ├── contact.json │ │ └── index.json │ ├── _mytag │ │ ├── 01_template.json │ │ └── 02_parts.json │ ├── _preset │ │ ├── grid_1.json │ │ ├── grid_2.json │ │ ├── grid_3.json │ │ ├── grid_4.json │ │ ├── grid_5.json │ │ ├── layout_1col_a.json │ │ ├── layout_1col_b.json │ │ ├── layout_1col_c.json │ │ ├── layout_2col_a.json │ │ ├── layout_2col_b.json │ │ ├── layout_2col_c.json │ │ ├── layout_2col_d.json │ │ ├── layout_3col_a.json │ │ ├── layout_3col_b.json │ │ ├── layout_3col_c.json │ │ ├── layout_4col_a.json │ │ ├── layout_4col_b.json │ │ ├── mt_1.json │ │ ├── tag_btn.json │ │ ├── tag_btns.json │ │ ├── tag_h1.json │ │ ├── tag_img.json │ │ ├── tag_imgs.json │ │ ├── tag_list.json │ │ ├── tag_p.json │ │ └── tag_table.json │ ├── _setting │ │ └── sitemap.json │ ├── _template │ │ ├── default.html │ │ ├── full.html │ │ ├── parts │ │ │ ├── footer.html │ │ │ ├── head.html │ │ │ ├── header.html │ │ │ └── header_sp.html │ │ └── simple.html │ ├── company.html │ ├── css │ │ ├── cms.css │ │ ├── free.css │ │ └── site.css │ ├── js │ │ ├── libs.js │ │ └── site.js │ ├── news.html │ ├── news_20150101.html │ ├── news_20150202.html │ ├── news_20150303.html │ ├── news_20150404.html │ ├── news_20150505.html │ ├── php │ │ └── mail.php │ ├── products.html │ └── recruit.html ├── images │ └── visual_main.jpg └── index.html ├── package-lock.json ├── package.json ├── src ├── js │ ├── cms_data │ │ ├── CMS_Data.AssetFile.js │ │ ├── CMS_Data.FreeFile.js │ │ ├── CMS_Data.InspectCSS.js │ │ ├── CMS_Data.Keys.js │ │ ├── CMS_Data.MainLoader.js │ │ ├── CMS_Data.MyTag.p1.js │ │ ├── CMS_Data.MyTag.p2.js │ │ ├── CMS_Data.MyTag.p3.js │ │ ├── CMS_Data.PresetBlock.js │ │ ├── CMS_Data.PresetJSON.js │ │ ├── CMS_Data.Replace.js │ │ ├── CMS_Data.Setting.js │ │ ├── CMS_Data.Sitemap.js │ │ ├── CMS_Data.Sitemap.js.RIFBackup.IGT │ │ ├── CMS_Data.Template.js │ │ └── CMS_Data.TextLoader.js │ ├── cms_main │ │ ├── CMS_AlertLockView.js │ │ ├── CMS_AlertView.js │ │ ├── CMS_CheckedView.js │ │ ├── CMS_ConfirmView.js │ │ ├── CMS_CopyView.js │ │ ├── CMS_E.js │ │ ├── CMS_ErrorView.js │ │ ├── CMS_FloatManager.js │ │ ├── CMS_Header.js │ │ ├── CMS_History.js │ │ ├── CMS_InitController.js │ │ ├── CMS_InputView.js │ │ ├── CMS_IntroView.js │ │ ├── CMS_KeyManager.js │ │ ├── CMS_LOCK.js │ │ ├── CMS_LivePreviewController.js │ │ ├── CMS_LoginView.js │ │ ├── CMS_MainController.js │ │ ├── CMS_ModalManager.js │ │ ├── CMS_Path.js │ │ ├── CMS_ProccessView.js │ │ ├── CMS_RootView.js │ │ ├── CMS_ScreenManager.js │ │ ├── CMS_ServerStatus.js │ │ ├── CMS_SettingsView.p5.js │ │ ├── CMS_SizeManager.js │ │ ├── CMS_StageController.js │ │ ├── CMS_Status.js │ │ ├── CMS_TabView.js │ │ ├── CMS_UtilClass.js │ │ ├── DragController.js │ │ ├── FormCandidates.js │ │ ├── HTMLService.2.js │ │ ├── HTMLService.3.js │ │ ├── HTMLService.js │ │ ├── NO_CMSView.js │ │ ├── TreeAPI.js │ │ ├── TreeViewMakerPreset.js │ │ ├── TreeViewMakerView.js │ │ ├── TreeViewMakerViewEditor.js │ │ ├── TreeViewMakerView_DirList.js │ │ ├── TreeViewMakerView_PageList.js │ │ ├── TreeViewMakerView_TagList.js │ │ ├── _trash │ │ │ ├── CMSView.js │ │ │ ├── CMS_AssetStage.js │ │ │ ├── CMS_Asset_DirArea.js │ │ │ ├── CMS_Asset_FileEditorView.js │ │ │ ├── CMS_Asset_FileEditorView.p2.js │ │ │ ├── CMS_Asset_FileEditorView.p3.js │ │ │ ├── CMS_Asset_FileEditorView.p4.js │ │ │ ├── CMS_Asset_FileEditorView.p5.js │ │ │ ├── CMS_Asset_FileListView.js │ │ │ ├── CMS_Asset_FileListView.p2.js │ │ │ ├── CMS_Asset_FileListView.p3.js │ │ │ ├── CMS_Asset_FileListView.p4.js │ │ │ ├── CMS_Asset_FileListView.p5.js │ │ │ ├── CMS_Asset_FilesArea.js │ │ │ ├── CMS_Asset_SettingEditorView.js │ │ │ ├── CMS_Asset_SettingListView.js │ │ │ ├── CMS_Asset_SettingsArea.js │ │ │ ├── CMS_SettingClass.js │ │ │ ├── CMS_SettingDB.js │ │ │ ├── CMS_SettingListView.js │ │ │ ├── CMS_SettingList_AssetFileMC.js │ │ │ ├── CMS_SettingList_AssetGroup.js │ │ │ ├── CMS_SettingList_AssetView.js │ │ │ ├── CMS_SettingList_SettingView.js │ │ │ ├── CMS_SettingList_TemplateGroup.js │ │ │ ├── CMS_SettingList_TemplateView.js │ │ │ ├── CMS_SettingStage.js │ │ │ ├── CMS_SettingView.js │ │ │ ├── CMS_SettingsView.p3.js │ │ │ ├── CMS_SettingsView.p4.js │ │ │ ├── CMS_SettingsView.p5.js │ │ │ └── TemplateFilesEditor.js │ │ ├── index.js │ │ ├── misk.js │ │ ├── misk2.js │ │ └── misk3.js │ ├── cms_model │ │ ├── Dic.js │ │ ├── Model.last.js │ │ ├── PageElement.js │ │ ├── PageElement.layout.colDiv.js │ │ ├── PageElement.layout.cols.js │ │ ├── PageElement.layout.div.js │ │ ├── PageElement.layout.js │ │ ├── PageElement.object.btnList.js │ │ ├── PageElement.object.carrousel.js │ │ ├── PageElement.object.data_csv.js │ │ ├── PageElement.object.data_json.js │ │ ├── PageElement.object.data_rss.js │ │ ├── PageElement.object.data_text.js │ │ ├── PageElement.object.data_xml.js │ │ ├── PageElement.object.dl.js │ │ ├── PageElement.object.feed.js │ │ ├── PageElement.object.feed_memo.txt │ │ ├── PageElement.object.formMail.js │ │ ├── PageElement.object.hinagata.js │ │ ├── PageElement.object.imageTexts.js │ │ ├── PageElement.object.images.js │ │ ├── PageElement.object.js │ │ ├── PageElement.object.list.js │ │ ├── PageElement.object.news.js │ │ ├── PageElement.object.newsB.js │ │ ├── PageElement.object.pageLink.js │ │ ├── PageElement.object.pagenation.js │ │ ├── PageElement.object.photos.js │ │ ├── PageElement.object.repeat.js │ │ ├── PageElement.object.replaceTexts.js │ │ ├── PageElement.object.share.js │ │ ├── PageElement.object.slides.js │ │ ├── PageElement.object.tabList.js │ │ ├── PageElement.object.table.js │ │ ├── PageElement.object.talk.js │ │ ├── PageElement.object.test.js │ │ ├── PageElement.object.tree.js │ │ ├── PageElement.replace.div.js │ │ ├── PageElement.replace.js │ │ ├── PageElement.setting.btnList.js │ │ ├── PageElement.setting.h1.js │ │ ├── PageElement.setting.h2.js │ │ ├── PageElement.setting.h3.js │ │ ├── PageElement.setting.h4.js │ │ ├── PageElement.setting.img.js │ │ ├── PageElement.setting.js │ │ ├── PageElement.setting.keyValue.js │ │ ├── PageElement.setting.note.js │ │ ├── PageElement.setting.p.js │ │ ├── PageElement.tag.anchor.js │ │ ├── PageElement.tag.blockquote.js │ │ ├── PageElement.tag.btn.js │ │ ├── PageElement.tag.code.js │ │ ├── PageElement.tag.heading.js │ │ ├── PageElement.tag.html.js │ │ ├── PageElement.tag.img.js │ │ ├── PageElement.tag.js │ │ ├── PageElement.tag.js.js │ │ ├── PageElement.tag.margin.js │ │ ├── PageElement.tag.markdown.js │ │ ├── PageElement.tag.note.js │ │ ├── PageElement.tag.p.js │ │ ├── PageElement.tag.place.js │ │ ├── PageElement_Dic.js │ │ ├── PageElement_HTMLService.js │ │ ├── PageElement_JText.js │ │ ├── PageElement_Util.js │ │ ├── PageModel.OG_Cell.js │ │ ├── PageModel.OG_SubInfo.js │ │ ├── PageModel.OG_info.js │ │ ├── PageModel.Object_.js │ │ ├── PageModel.Object_Grid.js │ │ ├── PageModel.Object_Info.js │ │ ├── PageModel.Tag_.js │ │ ├── PageModel.js │ │ ├── PageTypeList.free.js │ │ └── PageTypeList.js │ ├── cms_stage_asset │ │ ├── CMS_AssetDB.js │ │ ├── CMS_AssetFileU.js │ │ ├── CMS_AssetStage.js │ │ ├── CMS_AssetStageClose.js │ │ ├── CMS_AssetStageResizeView.js │ │ ├── CMS_Asset_CreateFileView.js │ │ ├── CMS_Asset_DirArea.js │ │ ├── CMS_Asset_FileDetailView.js │ │ ├── CMS_Asset_FileEditorClass.js │ │ ├── CMS_Asset_FileEditorView.js │ │ ├── CMS_Asset_FileListClass.js │ │ ├── CMS_Asset_FileListClass_List.js │ │ ├── CMS_Asset_FileListClass_ThumbList.js │ │ ├── CMS_Asset_FileListState.js │ │ ├── CMS_Asset_FileListU.js │ │ ├── CMS_Asset_FileListView.js │ │ ├── CMS_Asset_FileManageAPI.js │ │ ├── CMS_Asset_FilePreviewView.js │ │ ├── CMS_Asset_FilesArea.js │ │ ├── CMS_Asset_UploadClass.js │ │ ├── CMS_Asset_UploadU.js │ │ ├── CMS_Asset_UploaderState.js │ │ ├── CMS_Asset_UploaderView.js │ │ └── CMS_Asset_UploaderView2.js │ ├── cms_stage_page │ │ ├── CMS_PageClass.js │ │ ├── CMS_PageDB.js │ │ ├── CMS_PageID.js │ │ ├── CMS_PageListView.js │ │ ├── CMS_PageListViewSearch.js │ │ ├── CMS_PageListViewTree.js │ │ ├── CMS_PageList_ListClass.js │ │ ├── CMS_PageList_ListDB.js │ │ ├── CMS_PageList_PageClass.js │ │ ├── CMS_PageList_PageDB.js │ │ ├── CMS_PageList_StateManager.js │ │ ├── CMS_PageStage.js │ │ ├── CMS_PagesView.js │ │ └── CMS_PagesView_ZoomManager.js │ ├── cms_stage_setting │ │ ├── CMS_SettingsView.js │ │ ├── CMS_SettingsView.p2.js │ │ ├── CMS_SettingsView.p3.js │ │ ├── CMS_SettingsView.p4.js │ │ └── CMS_SettingsView.p5.js │ ├── cms_stage_sidepreview │ │ ├── CMS_SidePreview.js │ │ ├── CMS_SidePreviewClose.js │ │ └── CMS_SidePreviewPage.js │ ├── cms_storage │ │ ├── Storage.Embed.js │ │ ├── Storage.Local.js │ │ ├── Storage.Memo.js │ │ ├── Storage.Online.js │ │ ├── Storage.OnlineBatch.js │ │ ├── Storage.SimpleIO.js │ │ ├── Storage.StatusCheck.js │ │ └── Storage.js │ ├── cms_util │ │ ├── AnimU.js │ │ ├── CMS_AnchorListU.js │ │ ├── CMS_AnchorU.js │ │ ├── CMS_BlockAttrU.js │ │ ├── CMS_FormU.js │ │ ├── CMS_ImgBlockU.js │ │ ├── CMS_PateStateU.js │ │ ├── CMS_SaveDateU.js │ │ ├── CMS_TagU.js │ │ ├── CMS_TemplateU.js │ │ ├── CMS_U.js │ │ ├── CodeMirrorU.js │ │ ├── DateUtil.js │ │ ├── FileU.js │ │ ├── StringU.js │ │ ├── TagU.js │ │ ├── Treatment.js │ │ ├── URL_U.js │ │ ├── cms_base.js │ │ ├── functions.js │ │ ├── index.js │ │ └── pi_lib.js │ ├── cms_view_editable │ │ ├── EditableView.BaseBlock.js │ │ ├── EditableView.BaseGrid.js │ │ ├── EditableView.BaseGridState.js │ │ ├── EditableView.BaseGridU.js │ │ ├── EditableView.BaseTexts.js │ │ ├── EditableView.BaseTextsU.js │ │ ├── EditableView.CustomList.js │ │ ├── EditableView.CustomListData.js │ │ ├── EditableView.CustomListData_Dic.js │ │ ├── EditableView.CustomListPreset.js │ │ ├── EditableView.DocPageView.js │ │ ├── EditableView.FreeLayout.js │ │ ├── EditableView.FreeLayoutCols.js │ │ ├── EditableView.GridClass.js │ │ ├── EditableView.InputEvent.js │ │ ├── EditableView.InputFormProvider.js │ │ ├── EditableView.InputFormProviderGrid.js │ │ ├── EditableView.InputU.js │ │ ├── EditableView.M_Grid.js │ │ ├── EditableView.PageView.js │ │ ├── EditableView.PageView_Revision.js │ │ ├── EditableView.PageView_U.js │ │ ├── EditableView.SettingView.js │ │ ├── EditableView.SubPageView.js │ │ ├── EditableView.TextPageView.js │ │ ├── EditableView.js │ │ └── __EditableView.InputTagProvider.js │ ├── cms_view_floats │ │ ├── AddElements.js │ │ ├── AddElementsBtnSet.js │ │ ├── AddElementsManager.js │ │ ├── AddElementsView.js │ │ ├── Float_DateInputView.js │ │ ├── Float_Preview.1.js │ │ ├── Float_Preview.2.js │ │ ├── Float_Preview.3.js │ │ ├── Float_Preview.4.js │ │ ├── Float_Preview.5.js │ │ ├── Float_Preview.js │ │ ├── FreeLayoutInfoView.js │ │ ├── InputCnadidate.js │ │ └── SimpleToolTip.js │ ├── cms_view_imagemap │ │ ├── ImageMap.01.js │ │ ├── ImageMap.02.js │ │ ├── ImageMap.03.js │ │ ├── ImageMap.04.js │ │ ├── ImageMap.05.js │ │ ├── ImageMap.06.js │ │ ├── ImageMap.u1.js │ │ ├── ImageMap.u2.js │ │ ├── ImageMap.u3.js │ │ ├── ImageMap.u4.js │ │ └── ImageMap.u5.js │ ├── cms_view_inspect │ │ ├── InspectView.AnchorClass.js │ │ ├── InspectView.Embed.js │ │ ├── InspectView.Embed_U.js │ │ ├── InspectView.Export.js │ │ ├── InspectView.Footer.js │ │ ├── InspectView.FormU.js │ │ ├── InspectView.FormU_Heading.js │ │ ├── InspectView.FormU_Img.js │ │ ├── InspectView.FormU_Preset.js │ │ ├── InspectView.ID.js │ │ ├── InspectView.Tab.js │ │ ├── InspectView.TextAnchorClass.js │ │ ├── InspectView.View.js │ │ ├── InspectView.js │ │ ├── InspectView.p2.js │ │ └── InspectView.p3.js │ ├── cms_view_modals │ │ ├── Anchor_BtnView.js │ │ ├── Anchor_InputView.js │ │ ├── Anchor_PageListView.js │ │ ├── Anchor_TargetListView.js │ │ ├── BackupCreateView.js │ │ ├── BackupListView.js │ │ ├── BackupTargetView.js │ │ ├── BackupU.js │ │ ├── BackupView.js │ │ ├── BatchPublishQueueClass.js │ │ ├── BatchPublishView.js │ │ ├── BatchQueueControllClass.js │ │ ├── CMS_GuideView.js │ │ ├── CMS_GuideView.p2.js │ │ ├── CMS_LogView.js │ │ ├── CustomListPresetView.js │ │ ├── DirListView.js │ │ ├── DirTreeViewNode.js │ │ ├── DirTreeViewTest.js │ │ ├── DummyImageService.js │ │ ├── DummyImageView.js │ │ ├── Editer_CodeCopyView.js │ │ ├── Editer_ExcelEdit.js │ │ ├── Editer_JSONView.js │ │ ├── Editer_SingleView.js │ │ ├── Editer_TAGView.js │ │ ├── Editer_TextareaView.js │ │ ├── EmbedTagListView.js │ │ ├── FileInfoU.js │ │ ├── FileInfoView.js │ │ ├── FileInfoViewU.js │ │ ├── FileManagerAPI.js │ │ ├── FileManagerPreview.js │ │ ├── FileManagerView.js │ │ ├── FileManagerView.p2.js │ │ ├── FileManagerView.p3.js │ │ ├── GadgetListView.js │ │ ├── ImageDetailView.js │ │ ├── MiniEditer.CodeView.js │ │ ├── MiniEditer.CodeViewOption.js │ │ ├── MiniEditer.Editors.js │ │ ├── MiniEditer.InputView.js │ │ ├── MiniEditer.PresetClass.js │ │ ├── MiniEditer.js │ │ ├── ModalViewCreater.js │ │ ├── MyPresetAddView.js │ │ ├── MyPresetListView.js │ │ ├── MyPresetListViewClass.js │ │ ├── MyPresetListViewClass2.js │ │ ├── MyPresetPreView.js │ │ ├── MyTagListView.js │ │ ├── PresetStageView.1.js │ │ ├── PresetStageView.2.js │ │ ├── PresetStageView.3.js │ │ ├── PresetStageView.4.js │ │ ├── PresetStageView.5.js │ │ ├── Preset_CSSView.js │ │ ├── Preset_ClassView.js │ │ ├── Preset_IconView.js │ │ ├── ServerInfoView.js │ │ ├── SitemapEditView.js │ │ ├── UploadU.js │ │ ├── UploadView.js │ │ ├── UploadView.p2.js │ │ ├── UploadView.p3.js │ │ ├── UploaderState.js │ │ └── UploaderU.js │ └── copyright.js └── sass │ ├── _01_reset.scss │ ├── _02_base.scss │ ├── _10_form.scss │ ├── _10_view.main.scss │ ├── _10_view.pageStage.list.scss │ ├── _10_view.pageStage.page.scss │ ├── _10_view.pageStage.scss │ ├── _10_view.preview.scss │ ├── _10_view.settingStage.list.scss │ ├── _10_view.settingStage.page.scss │ ├── _10_view.settingStage.scss │ ├── _10_view.side.scss │ ├── _20_view.freelayout.scss │ ├── _20_view.modal.scss │ ├── _20_view.modal2.scss │ ├── _20_view.page.scss │ ├── _30_view.float.scss │ ├── _40_responsive.scss │ ├── _40_view.inspect.scss │ ├── _50_zindex.scss │ ├── _60_spriteseet.scss │ ├── _70_misk.scss │ ├── _mixin.scss │ ├── _setting.scss │ ├── _snipet.scss │ └── cms.scss └── tasks ├── css.js └── js.js /README.md: -------------------------------------------------------------------------------- 1 | # JS CMS v4.1.5.3 2 | 簡単・無料・国産のWebデザイナー向けCMSです。 3 | このページでは、JS CMSのソースコードを配布しています。 4 | 5 | ソースコードといっても、JSファイルを連結して、`/js-cms/js_cms/_cms/js/cms.js`を生成するのと、`/js_cms/_cms/css/cms.css`をSASSから生成するだけです。 6 | 7 | ## 公式サイト 8 | 9 | http://www.js-cms.jp/ 10 | 11 | ## ライセンス 12 | MIT licenses 13 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 2 | var gulp = require("gulp"); 3 | var exec = require('gulp-exec'); 4 | 5 | var dir = require( 'require-dir' ); 6 | dir( './tasks', { recurse: true } ); 7 | 8 | gulp.task('watch', function() { 9 | gulp.watch('./src/js/**/*', ['concat:js']); 10 | gulp.watch('./src/sass/**/*', ['concat:css']); 11 | }); 12 | -------------------------------------------------------------------------------- /js_cms/_cms/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Shigenori Tanaka tanaka@pixelimage.jp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /js_cms/_cms/check.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | GRID 11 | 12 | 13 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /js_cms/_cms/grid/grid_setting.js: -------------------------------------------------------------------------------- 1 | 2 | //サイトマップパス (JS CMS形式) 3 | var GRID_SITEMAP_JSON = "../../html/_setting/sitemap.json"; 4 | 5 | //サイトマップパス (テキスト形式) 6 | //var GRID_SITEMAP_TXT = "grid_sitemap.txt"; 7 | //var GRID_SITEMAP_TXT = "__grid_sitemap_test.txt"; 8 | 9 | //カスタマイズ用のタブ 10 | var GRID_MY_TAB = ["A","B","C","D","E"]; 11 | 12 | //一度に表示するページ数 13 | var GRID_PAGE_UNIT = 10; 14 | 15 | //編集ページURL 16 | var GRID_EDIT_URL = "../#"; 17 | 18 | //プリセット 19 | var GRID_PRESETs = [ 20 | { scale: 33.3, height: 1200, widths: [1200] }, 21 | { scale: 15, height: 4000, widths: [1200] }, 22 | { scale: 50, height: 1500, widths: [320] }, 23 | { scale: 25, height: 1500, widths: [800] }, 24 | { scale: 25, height: 1500, widths: [1200, 320] } 25 | ]; 26 | 27 | -------------------------------------------------------------------------------- /js_cms/_cms/grid/grid_sitemap.txt: -------------------------------------------------------------------------------- 1 | ../../ 2 | 3 | #ルート 4 | トップ,index.html 5 | SITEMAP,sitemap.html 6 | 問い合わせ,contact.html 7 | 8 | #会社について 9 | はじめに,html/company.html 10 | 会社概要,html/company_outline.html 11 | 沿革,html/company_histoty.html 12 | 事務所一覧,html/company_office.html 13 | 14 | #お知らせ 15 | お知らせ一覧,html/news.html 16 | 2015/05/05,html/news_20150505.html 17 | 2015/04/04,html/news_20150404.html 18 | 2015/03/03,html/news_20150303.html 19 | 2015/02/02,html/news_20150202.html 20 | 2015/01/01,html/news_20150101.html 21 | 22 | #製品案内 23 | 製品案内,html/products.html 24 | PRODUCTS AA01,html/products_01.html 25 | PRODUCTS BB01,html/products_02.html 26 | PRODUCTS CC01,html/products_03.html 27 | PRODUCTS DD01,html/products_04.html 28 | 29 | #採用情報 30 | 募集要項,html/rec_guideline.html 31 | 福利厚生,html/rec_benefits.html 32 | よくある質問,html/rec_faq.html 33 | -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_controllpanel_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_controllpanel_bg.png -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_controllpanel_bg_ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_controllpanel_bg_ng.png -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_controllpanel_ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_controllpanel_ss.png -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_grid.png -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_revalpanel_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_revalpanel_bg.png -------------------------------------------------------------------------------- /js_cms/_cms/grid/images/grid_revalpanel_bg_ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/grid/images/grid_revalpanel_bg_ng.png -------------------------------------------------------------------------------- /js_cms/_cms/images/bg_dragbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/bg_dragbar.png -------------------------------------------------------------------------------- /js_cms/_cms/images/bg_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/bg_grid.png -------------------------------------------------------------------------------- /js_cms/_cms/images/bg_mock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/bg_mock.png -------------------------------------------------------------------------------- /js_cms/_cms/images/bg_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/bg_shadow.png -------------------------------------------------------------------------------- /js_cms/_cms/images/bg_shaow_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/bg_shaow_h.png -------------------------------------------------------------------------------- /js_cms/_cms/images/btn_closes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/btn_closes.png -------------------------------------------------------------------------------- /js_cms/_cms/images/btn_select_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/btn_select_bg.png -------------------------------------------------------------------------------- /js_cms/_cms/images/colorlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/colorlist.png -------------------------------------------------------------------------------- /js_cms/_cms/images/css_copy_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/css_copy_bg.png -------------------------------------------------------------------------------- /js_cms/_cms/images/custom_bg_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/custom_bg_a.jpg -------------------------------------------------------------------------------- /js_cms/_cms/images/custom_bg_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/custom_bg_b.png -------------------------------------------------------------------------------- /js_cms/_cms/images/guide_rep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/guide_rep.png -------------------------------------------------------------------------------- /js_cms/_cms/images/icon_dirs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/icon_dirs.png -------------------------------------------------------------------------------- /js_cms/_cms/images/icon_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/icon_intro.png -------------------------------------------------------------------------------- /js_cms/_cms/images/icon_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/icon_tree.png -------------------------------------------------------------------------------- /js_cms/_cms/images/icon_tree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/icon_tree2.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_add.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_add_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_add_image.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_file.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_gadget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_gadget.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_mylist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_mylist.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_mylist_ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_mylist_ac.png -------------------------------------------------------------------------------- /js_cms/_cms/images/ss_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/js_cms/_cms/images/ss_target.png -------------------------------------------------------------------------------- /js_cms/_cms/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | JS CMS 管理画面 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 37 | 38 | 39 |
ロード中です...
40 | 41 | -------------------------------------------------------------------------------- /js_cms/_cms/login.php: -------------------------------------------------------------------------------- 1 | 3 |
4 | {{FILE:parts/header_sp.html}} 5 | {{FILE:parts/header.html}} 6 | 7 | 8 | 9 |
10 |
11 | {{PAGE_CONTENTS}} 12 |
13 |
14 | 15 | {{FILE:parts/footer.html}} 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /js_cms/html/_template/full.html: -------------------------------------------------------------------------------- 1 | {{FILE:parts/head.html}} 2 | 3 |
4 | {{FILE:parts/header_sp.html}} 5 | {{FILE:parts/header.html}} 6 | 7 |
8 | {{PAGE_CONTENTS}} 9 |
10 | 11 | {{FILE:parts/footer.html}} 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /js_cms/html/_template/parts/footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | {{FOOTER_TEXT}} 5 |
6 |
7 | 8 | -------------------------------------------------------------------------------- /js_cms/html/_template/parts/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{HEAD_TITLE}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /js_cms/html/_template/parts/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | {{HEADER}} 5 |
6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /js_cms/html/_template/parts/header_sp.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | {{MOBILE_HEADER}} 6 | 7 |
8 |
9 |
{{MOBILE_MENU}}
10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /js_cms/html/_template/simple.html: -------------------------------------------------------------------------------- 1 | {{FILE:parts/head.html}} 2 | 3 | {{PAGE_CONTENTS}} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /js_cms/html/css/free.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /* 4 | カスタマイズ用クラス 5 | 6 | 自由にCSSを設定してください。 7 | 8 | ※このCSSで定義したクラスは、CMS管理画面でのページ編集においても利用できます。 9 | ※編集後はブラウザリロードしてください。 10 | */ 11 | -------------------------------------------------------------------------------- /js_cms/html/js/site.js: -------------------------------------------------------------------------------- 1 | /* 2 | サイト用カスタムJavaScript 3 | 4 | 自由に編集してください。 5 | デフォルトでは、汎用的なUIパーツが登録されています。 6 | 7 | ※編集後はブラウザリロードしてください。 8 | 9 | */ 10 | 11 | //環境調査 UAで判別 12 | var isMobile = false; 13 | var ua = navigator.userAgent 14 | if(ua.indexOf('iPad') != -1) isMobile = true; 15 | if(ua.indexOf('iPhone') != -1) isMobile = true; 16 | if(ua.indexOf('Android') != -1) isMobile = true; 17 | 18 | 19 | //環境調査 レスポンシブ用 20 | /* 21 | var isWideScreen = function() { 22 | var _breakPoint = "(max-width: 768px)"; 23 | if (window.matchMedia( _breakPoint ).matches) { 24 | return false; 25 | } else { 26 | return true; 27 | } 28 | }; 29 | */ 30 | 31 | $(function(){ 32 | 33 | //スマホ用UI設定 34 | var mUI = $('#MobileUI'); 35 | mUI.find('.menuBtn').click(function(){mUI.toggleClass("show");}); 36 | mUI.find('.mobileBG').click(function(){mUI.removeClass("show");}); 37 | 38 | //トグルメニュー設定 39 | $(".cms-toggle").cms_toggle(); 40 | 41 | //トグルメニュー設定 (サイドメニューやスマホ用UIで使用) 42 | $("._type-dir-toggle > p,._type-dir-toggle > a").cms_toggle_menu(); 43 | 44 | //スクロール時にサイドバー固定(モバイルでは行わない) 45 | if(!isMobile) $("#SideArea").stick_in_parent({offset_top:20}); 46 | 47 | //要素の高さを揃える 48 | $('.commonHeight > *').matchHeight( { byRow: true, property: 'height' }); 49 | 50 | //ダミーイメージサービス初期化 51 | $.cms_dummyImage(); 52 | 53 | //モーダルウィンドウ作成 54 | $.cms_modal({className:'cms-modal'}); 55 | 56 | //ページトップボタン作成 57 | $.cms_pagetop({className:'cms-pagetop',icon:''}); 58 | 59 | //ページ内リンクの生成 (ページ内リンクブロック用) 60 | $(".cms-pagelink").cms_createLink(); 61 | 62 | //ページ内リンクのスムーススクロール設定 63 | $.cms_pagelink({offset:-50}); 64 | 65 | }); 66 | 67 | -------------------------------------------------------------------------------- /js_cms/html/php/mail.php: -------------------------------------------------------------------------------- 1 | ' 16 | tag += '
' 17 | tag += '
更新ロックを解除してください
' 18 | // tag += '
閉じる
' 19 | tag += '
' 20 | tag += '
' 21 | view.html(tag) 22 | setBtn(); 23 | } 24 | 25 | function setBtn(){ 26 | view.click(function(){ stageOut() }); 27 | // view.find('._btn_close').click(function(){ stageOut() }); 28 | } 29 | 30 | /* ---------- ---------- ---------- */ 31 | 32 | var isOpen = false; 33 | var isFirst = true; 34 | var callback; 35 | function stageInit(){ 36 | view.hide(); 37 | } 38 | var tID 39 | function stageIn(){ 40 | if(! isOpen){ isOpen = true; 41 | view.show(); 42 | if(isFirst){ 43 | createlayout(); 44 | } 45 | isFirst = false; 46 | setTimeout(function(){ 47 | view.addClass("_show"); 48 | },10); 49 | if(tID) clearTimeout(tID) 50 | tID = setTimeout(function(){ 51 | stageOut() 52 | },3500); 53 | } 54 | } 55 | function stageOut(){ 56 | if(isOpen){ isOpen = false; 57 | view.hide(); 58 | view.removeClass("_show"); 59 | if(tID)clearTimeout(tID) 60 | } 61 | } 62 | 63 | return { init:init, stageIn:stageIn, stageOut:stageOut } 64 | })(); 65 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_AlertView.js: -------------------------------------------------------------------------------- 1 | var CMS_AlertView = (function(){ 2 | var view; 3 | var v = {}; 4 | 5 | function init(){ 6 | view = $('#CMS_AlertView'); 7 | stageInit(); 8 | } 9 | 10 | /* ---------- ---------- ---------- */ 11 | 12 | function createlayout(){ 13 | v = ModalViewCreater.createBaseView(Anchor_InputView,view); 14 | var tag = "" 15 | v.header.html(tag); 16 | 17 | tag = "" 18 | v.body.html(tag); 19 | 20 | tag = "" 21 | tag += '
キャンセル
'; 22 | tag += '
OK
'; 23 | v.footer.html(tag); 24 | setBtn(); 25 | } 26 | 27 | function setBtn(){ 28 | view.find('._bg ,._btn_close').click(function(){ stageOut() }); 29 | view.find('._btn_do').click(function(){ callback(); stageOut() }); 30 | } 31 | 32 | /* ---------- ---------- ---------- */ 33 | 34 | function update(_s,_s2){ 35 | 36 | 37 | var tag = '
'+_s+'
' 38 | v.header.html(tag); 39 | var tag = '
'+_s2+'
' 40 | v.body.html(tag); 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | var isOpen = false; 46 | var isFirst = true; 47 | var callback; 48 | function stageInit(){ 49 | view.hide(); 50 | } 51 | function stageIn(_s,_s2,_callback){ 52 | if(!view){ 53 | $("body").append('
'); 54 | init(); 55 | } 56 | if(! isOpen){ isOpen = true; 57 | view.show(); 58 | if(isFirst){ 59 | createlayout(); 60 | } 61 | isFirst = false; 62 | callback = _callback; 63 | if(callback ==undefined) callback = function(){} 64 | update(_s,_s2); 65 | } 66 | } 67 | function stageOut(){ 68 | if(isOpen){ isOpen = false; 69 | view.hide(); 70 | } 71 | } 72 | 73 | return { init:init, stageIn:stageIn, stageOut:stageOut } 74 | })(); 75 | 76 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_ConfirmView.js: -------------------------------------------------------------------------------- 1 | var CMS_ConfirmView = (function(){ 2 | var view; 3 | var v = {}; 4 | 5 | function init(){ 6 | view = $('#CMS_ConfirmView'); 7 | stageInit(); 8 | } 9 | 10 | /* ---------- ---------- ---------- */ 11 | 12 | function createlayout(){ 13 | v = ModalViewCreater.createBaseView(Anchor_InputView,view); 14 | var tag = "" 15 | v.header.html(tag); 16 | 17 | tag = "" 18 | v.body.html(tag); 19 | 20 | tag = "" 21 | tag += '
キャンセル
'; 22 | tag += '
OK
'; 23 | tag += '
削除
'; 24 | v.footer.html(tag); 25 | v.btn_active = view.find("._cms_btn_active") 26 | v.btn_red = view.find("._cms_btn_red") 27 | setBtn(); 28 | } 29 | 30 | function setBtn(){ 31 | view.find('._bg ,._btn_close').click(function(){ stageOut() }); 32 | view.find('._btn_do').click(function(){ callback(); stageOut() }); 33 | } 34 | 35 | /* ---------- ---------- ---------- */ 36 | 37 | function update(_s,_s2,_isDell){ 38 | var tag = '
'+_s+'
' 39 | v.header.html(tag); 40 | var tag = '
'+_s2+'
' 41 | v.body.html(tag); 42 | 43 | v.btn_red.hide() 44 | v.btn_active.hide() 45 | if(_isDell == "DELL"){ 46 | v.btn_red.show() 47 | } else{ 48 | v.btn_active.show() 49 | } 50 | } 51 | 52 | /* ---------- ---------- ---------- */ 53 | 54 | var isOpen = false; 55 | var isFirst = true; 56 | var callback; 57 | function stageInit(){ 58 | view.hide(); 59 | } 60 | function stageIn(_s,_s2,_callback,_isDell){ 61 | if(! isOpen){ isOpen = true; 62 | showModalView(this); 63 | view.show(); 64 | if(isFirst){ 65 | createlayout(); 66 | } 67 | isFirst = false; 68 | callback = _callback 69 | update(_s,_s2,_isDell); 70 | } 71 | } 72 | function stageOut(){ 73 | if(isOpen){ isOpen = false; 74 | hideModalView(); 75 | view.hide(); 76 | } 77 | } 78 | 79 | return { init:init, stageIn:stageIn, stageOut:stageOut } 80 | })(); 81 | 82 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_CopyView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_CopyView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#CMS_CopyView'); 8 | stageInit(); 9 | 10 | $("body").on("click","._cms_btn_copy_text",function(){ 11 | var s = $(this).data("text"); 12 | CMS_CopyView.stageIn(s); 13 | }) 14 | $("body").on("click","._cms_btn_copy_page_id",function(){ 15 | var s = $(this).text(); 16 | CMS_CopyView.stageIn(s); 17 | }); 18 | } 19 | 20 | /* ---------- ---------- ---------- */ 21 | 22 | function createlayout(){ 23 | v = ModalViewCreater.createBaseView(Anchor_InputView,view); 24 | var tag = "" 25 | v.header.html(tag); 26 | 27 | tag = "" 28 | v.body.html(tag); 29 | 30 | tag = "" 31 | tag += '
閉じる
'; 32 | v.footer.html(tag); 33 | setBtn(); 34 | } 35 | 36 | function setBtn(){ 37 | view.find('._bg ,._btn_close').click(function(){ stageOut() }); 38 | // view.find('._btn_do').click(function(){ callback(); stageOut() }); 39 | } 40 | 41 | /* ---------- ---------- ---------- */ 42 | 43 | function update(_s){ 44 | var tag = '
コピーしてください
' 45 | v.header.html(tag); 46 | var tag = ''; 47 | tag +=''; 48 | 49 | v.body.html(tag); 50 | view.find("textarea").select() 51 | } 52 | 53 | /* ---------- ---------- ---------- */ 54 | 55 | var isOpen = false; 56 | var isFirst = true; 57 | var callback; 58 | function stageInit(){ 59 | view.hide(); 60 | } 61 | function stageIn(_s,_callback){ 62 | if(! isOpen){ isOpen = true; 63 | showModalView(this); 64 | view.show(); 65 | if(isFirst){ 66 | createlayout(); 67 | } 68 | isFirst = false; 69 | callback = _callback 70 | update(_s); 71 | } 72 | } 73 | function stageOut(){ 74 | if(isOpen){ isOpen = false; 75 | hideModalView(); 76 | view.hide(); 77 | } 78 | } 79 | 80 | return { init:init, stageIn:stageIn, stageOut:stageOut } 81 | })(); 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_E.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_E = {} 3 | CMS_E.DIR_ERROR = "dir error"; 4 | CMS_E.PARSE_ERROR = '
パースエラー
'; 5 | CMS_E.NOT_FOUND = "file or directory not found"; 6 | CMS_E.getText = function(_s){ 7 | if(_s == this.DIR_ERROR) return "ディレクトリがありません"; 8 | if(_s == this.NOT_FOUND) return "ディレクトリかファイルがありません"; 9 | return _s; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_FloatManager.js: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------- /src/js/cms_main/CMS_History.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_History = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | document.title = SITE_NAME; 8 | try{ 9 | window.addEventListener('popstate', function(e) { 10 | if(e.state == null )return; 11 | openPage(e.state); 12 | },false); 13 | window.addEventListener('hashchange', function() { 14 | if(!openBlock){ 15 | var state = window.location.hash; 16 | CMS_MainController.openPage_by_hash(state); 17 | } 18 | },false); 19 | }catch( e ){} 20 | } 21 | function getInitParam(){ 22 | var state = window.location.hash; 23 | state = "/" + state.split("#").join(""); 24 | return CMS_Path.PAGE.getAbsPath_reverse(state); 25 | } 26 | 27 | var openBlock = false 28 | function openPage(_state){ 29 | if(openBlock == false){ 30 | openBlock = true; 31 | openPage_core(_state); 32 | setTimeout(function(){ 33 | openBlock = false; 34 | },100); 35 | } 36 | } 37 | 38 | function openPage_core(_state){ 39 | var state = CMS_Path.PAGE.getAbsPath_reverse(_state); 40 | var param = CMS_Data.Sitemap.getData_by_id(state.id,state.dir); 41 | if(param){ 42 | CMS_MainController.openPage(param,false); 43 | } 44 | } 45 | function addPage(_param){ 46 | var dir = "" 47 | var id = _param.id 48 | if(_param["dir"] != undefined) dir = _param.dir; 49 | 50 | var state = CMS_Path.PAGE.getAbsPath(id,dir); 51 | var name = _param.name; 52 | 53 | //myタグページ調整 54 | if(_param.type == Dic.PageType.CMS_MYTAG){ 55 | state = CMS_Path.PAGE.ABS + state; 56 | state = state.split("//").join("/"); 57 | name = "{{Myタグ設定}} " + name; 58 | } 59 | 60 | var hash = state; 61 | if(hash.charAt(0) == "/") hash = state.substr(1,state.length) 62 | 63 | document.title = (function(_param){ 64 | if(name == undefined){ 65 | return CMS_INFO.name + " : " + _param.id; 66 | // return CMS_INFO.name + " : " + _param.id; 67 | } else{ 68 | return SITE_NAME + " : " + name; 69 | } 70 | })(_param); 71 | if(history["pushState"]){ 72 | history.pushState(state, null, "#" +hash); 73 | } 74 | } 75 | 76 | return { 77 | init: init, 78 | getInitParam: getInitParam, 79 | addPage: addPage 80 | } 81 | })(); 82 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_InputView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_InputView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#CMS_InputView'); 8 | stageInit(); 9 | } 10 | 11 | /* ---------- ---------- ---------- */ 12 | 13 | function createlayout(){ 14 | v = ModalViewCreater.createBaseView(Anchor_InputView,view); 15 | var tag = "" 16 | v.header.html(tag); 17 | 18 | tag = "" 19 | v.body.html(tag); 20 | 21 | tag = "" 22 | tag += '
閉じる
'; 23 | tag += '
OK
'; 24 | v.footer.html(tag); 25 | setBtn(); 26 | } 27 | 28 | function setBtn(){ 29 | view.find('._bg ,._btn_close').click(function(){ stageOut() }); 30 | view.find('._btn_do').click(function(){ done(); stageOut(); }); 31 | } 32 | 33 | /* ---------- ---------- ---------- */ 34 | 35 | var defParam = {} 36 | function update(_param){ 37 | defParam = JSON.parse(JSON.stringify(_param)); 38 | 39 | var tag = '
'+_param.title+'
' 40 | v.header.html(tag); 41 | var tag = ''; 42 | tag += '
'+_param.read+'
' 43 | 44 | //single 45 | if(_param.type == "single"){ 46 | tag +=''; 47 | } 48 | //single以外は、未実装 49 | tag += '
'+_param.notes+'
' 50 | v.body.html(tag); 51 | view.find("input").val(_param.val).select(); 52 | } 53 | 54 | /* ---------- ---------- ---------- */ 55 | 56 | function done(){ 57 | var val = view.find("input").val(); 58 | callback(val); 59 | 60 | } 61 | 62 | /* ---------- ---------- ---------- */ 63 | 64 | var isOpen = false; 65 | var isFirst = true; 66 | var callback; 67 | function stageInit(){ 68 | view.hide(); 69 | } 70 | function stageIn(_param,_callback){ 71 | if(! isOpen){ isOpen = true; 72 | showModalView(this); 73 | view.show(); 74 | if(isFirst){ 75 | createlayout(); 76 | } 77 | isFirst = false; 78 | callback = _callback 79 | update(_param); 80 | } 81 | } 82 | function stageOut(){ 83 | if(isOpen){ isOpen = false; 84 | hideModalView(); 85 | view.hide(); 86 | } 87 | } 88 | 89 | return { init:init, stageIn:stageIn, stageOut:stageOut } 90 | })(); 91 | 92 | 93 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_IntroView.js: -------------------------------------------------------------------------------- 1 | var CMS_IntroView = (function(){ 2 | var view; 3 | var v = {}; 4 | 5 | function init(){ 6 | view = $('#CMS_IntroView'); 7 | stageInit(); 8 | createlayout(); 9 | setBtn(); 10 | } 11 | 12 | /* ---------- ---------- ---------- */ 13 | 14 | function setBtn(){ 15 | } 16 | 17 | function createlayout(){ 18 | var tag = '' 19 | tag += '
' 20 | tag += '

←左のメニューから、サイト設定やページ作成・編集などの操作できます

' 21 | //tag += '
初めての方は、ガイドを確認してください。
' 22 | tag += '
' 23 | view.append(tag) 24 | } 25 | 26 | /* ---------- ---------- ---------- */ 27 | 28 | var isOpen = false; 29 | var isFirst = true; 30 | function stageInit(){ 31 | view.hide(); 32 | } 33 | function stageIn(){ 34 | if(! isOpen){ isOpen = true; 35 | view.show(); 36 | if(isFirst){} 37 | isFirst = false; 38 | } 39 | } 40 | function stageOut(){ 41 | if(isOpen){ isOpen = false; 42 | view.hide(); 43 | } 44 | } 45 | 46 | return { init:init, stageIn:stageIn, stageOut:stageOut } 47 | })(); -------------------------------------------------------------------------------- /src/js/cms_main/CMS_LivePreviewController.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_LivePreviewController = (function(){ 3 | 4 | //ページ開いた時にコールされる 5 | 6 | function openedPage(){ 7 | if(! CMS_PageDB.hasCurrent())return; 8 | CMS_SidePreview.openedPage(); 9 | } 10 | 11 | //ページ更新があったら、コールされる 12 | //ブロック操作時、保存時など 13 | function editedPage(_delay){ 14 | if(! CMS_PageDB.hasCurrent())return; 15 | CMS_SidePreview.editedPage(_delay); 16 | } 17 | 18 | //保存時にコールされる 19 | function savedPage(){ 20 | if(! CMS_PageDB.hasCurrent())return; 21 | CMS_SidePreview.savedPage(); 22 | } 23 | function publishedPage(){ 24 | if(! CMS_PageDB.hasCurrent())return; 25 | CMS_SidePreview.publishedPage(); 26 | } 27 | 28 | return { 29 | openedPage: openedPage, 30 | editedPage: editedPage, 31 | savedPage: savedPage, 32 | publishedPage: publishedPage 33 | } 34 | })(); 35 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_ModalManager.js: -------------------------------------------------------------------------------- 1 | 2 | function showModalView(_v){ CMS_ModalManager.showModalView(_v) } 3 | function hideModalView(){ CMS_ModalManager.hideModalView() } 4 | function hideFloatView(){ CMS_ModalManager.hideFloatView() } 5 | 6 | //ショートカットキーで、モーダル時にはスルーするように管理 7 | var CMS_ModalManager = (function() { 8 | 9 | var modalStac = 0; 10 | var isFocus = false; 11 | 12 | function init() { 13 | var tar = "#InspectView textarea, #InspectView input"; 14 | $(document).on("focus" ,tar,function(){ 15 | isFocus = true; 16 | update() 17 | }) 18 | $(document).on("blur" ,tar,function(){ 19 | isFocus = false; 20 | update() 21 | }) 22 | } 23 | // var currentPageType = "" 24 | // function setEditPageType(_type) { 25 | // currentPageType = _type; 26 | // } 27 | 28 | /* ---------- ---------- ---------- */ 29 | 30 | var currents = []; 31 | function showModalView(_view) { 32 | currents.push(_view); 33 | hideFloatView(); 34 | modalStac++; 35 | update(); 36 | } 37 | 38 | function hideModalView() { 39 | hideFloatView() 40 | modalStac--; 41 | currents.pop(); 42 | update(); 43 | } 44 | function update() { 45 | } 46 | function isModal() { 47 | return(modalStac > 0) 48 | } 49 | function isNotModal() { 50 | if(modalStac == 0){ 51 | if(isFocus == false){ 52 | return true; 53 | } 54 | } 55 | return false; 56 | } 57 | 58 | function closeModal() { 59 | if(currents.length == 0)return; 60 | if (!currents[currents.length-1]) return; 61 | var currentView = currents[currents.length-1] 62 | if(currentView["compliteEdit"]) { 63 | currentView.compliteEdit(); 64 | return; 65 | } 66 | if(currentView["stageOut"]) { 67 | currentView.stageOut(); 68 | return; 69 | } 70 | } 71 | 72 | function hideFloatView() { 73 | if (window["Float_DateInputView"]) Float_DateInputView.stageOut(); 74 | if (window["CMS_GuideView"]) CMS_GuideView.stageOut(); 75 | if (window["FreeLayoutInfoView"]) FreeLayoutInfoView.stageOut(); 76 | } 77 | /* ---------- ---------- ---------- */ 78 | 79 | return { 80 | init: init, 81 | // setEditPageType: setEditPageType, 82 | showModalView: showModalView, 83 | hideModalView: hideModalView, 84 | hideFloatView: hideFloatView, 85 | isModal: isModal, 86 | isNotModal: isNotModal, 87 | closeModal: closeModal 88 | } 89 | })(); 90 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_ProccessView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_ProccessView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#CMS_ProccessView'); 8 | stageInit(); 9 | } 10 | 11 | /* ---------- ---------- ---------- */ 12 | 13 | function createlayout(){ 14 | var tag = ""; 15 | tag += '
'; 16 | tag += '
'; 17 | tag += '
'; 18 | tag += '
'; 19 | view.html(tag) 20 | v.process = view.find("._process") 21 | } 22 | 23 | /* ---------- ---------- ---------- */ 24 | 25 | function update(_s){ 26 | if(!_s){ 27 | v.process.html(' 処理中...') 28 | } else{ 29 | v.process.html(_s) 30 | } 31 | } 32 | 33 | /* ---------- ---------- ---------- */ 34 | 35 | var isOpen = false; 36 | var isFirst = true; 37 | function stageInit(){ 38 | view.hide(); 39 | } 40 | function stageIn(){ 41 | if(! isOpen){ isOpen = true; 42 | showModalView(this); 43 | view.show(); 44 | if(isFirst){ 45 | createlayout(); 46 | } 47 | isFirst = false; 48 | update(); 49 | } 50 | } 51 | function stageOut(){ 52 | if(isOpen){ isOpen = false; 53 | hideModalView(); 54 | view.hide(); 55 | } 56 | } 57 | 58 | return { 59 | init:init, 60 | update:update, 61 | stageIn:stageIn, 62 | stageOut:stageOut 63 | } 64 | })(); 65 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_RootView.js: -------------------------------------------------------------------------------- 1 | //メインビュー管理 2 | var CMS_RootView = (function() { 3 | var view; 4 | var v = {}; 5 | 6 | function init() { 7 | view = $('#CMS_RootView'); 8 | stageInit(); 9 | createlayout(); 10 | setBtn(); 11 | } 12 | 13 | function setBtn() {} 14 | 15 | function createlayout() {} 16 | 17 | /* ---------- ---------- ---------- */ 18 | 19 | var isOpen = false; 20 | var isFirst = true; 21 | 22 | function stageInit() { 23 | view.hide(); 24 | } 25 | 26 | function stageIn() { 27 | if (!isOpen) { 28 | isOpen = true; 29 | view.show(); 30 | if (isFirst) { 31 | createlayout(); 32 | } 33 | isFirst = false; 34 | } 35 | } 36 | 37 | function stageOut() { 38 | if (isOpen) { 39 | isOpen = false; 40 | view.hide(); 41 | } 42 | } 43 | 44 | function resize() { 45 | if (isOpen) {} 46 | } 47 | 48 | return { 49 | init: init, 50 | stageIn: stageIn, 51 | stageOut: stageOut 52 | } 53 | })(); -------------------------------------------------------------------------------- /src/js/cms_main/CMS_ServerStatus.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_ServerStatus = { 3 | version: "" 4 | } 5 | var CMS_ServerStatusFunc = (function() { 6 | var versionNumber 7 | 8 | function setVersion(_v) { 9 | var vs = _v.phpversion.split(".") 10 | if (vs.length != 3) return; 11 | CMS_ServerStatus.version = _v.phpversion; 12 | versionNumber = convert(CMS_ServerStatus.version) 13 | } 14 | 15 | function convert(_s) { 16 | var vs = _s.split(".") 17 | if (vs.length != 3) return 0; 18 | return vs[0] * 1000000 + vs[1] * 1000 + vs[2] * 1; 19 | } 20 | 21 | function checkCoverVersion(_v) { 22 | var vv = convert(_v) 23 | if (vv <= versionNumber) { 24 | return true; 25 | } else { 26 | return false; 27 | } 28 | } 29 | 30 | return { 31 | setVersion: setVersion, 32 | checkCoverVersion: checkCoverVersion 33 | } 34 | })(); 35 | 36 | -------------------------------------------------------------------------------- /src/js/cms_main/CMS_SettingsView.p5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/CMS_SettingsView.p5.js -------------------------------------------------------------------------------- /src/js/cms_main/CMS_Status.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Status = { 3 | sitemapDirOpens: null, 4 | W: 1000, 5 | H: 1000, 6 | mouseX: 0, 7 | mouseY: 0, 8 | 9 | //現在編集中の情報 10 | // currentPage:null, 11 | // currentPage_preview:null, 12 | //フリーレイアウトで、コピペで使う 13 | clipBord: "", 14 | clipBordPage: "" 15 | } 16 | 17 | var CMS_StatusFunc = (function() { 18 | 19 | function setSitemapDirOpens(_a) { 20 | CMS_Status.sitemapDirOpens = _a 21 | } 22 | 23 | function checkSitemapDirOpens_by_id(_id) { 24 | var openList = CMS_Status.sitemapDirOpens 25 | for (var i = 0; i < openList.length; i++) { 26 | if ("sitemap_" + _id == openList[i][0]) { 27 | if (openList[i][1] == 1) { 28 | return true; 29 | } 30 | } 31 | } 32 | return false; 33 | } 34 | 35 | return { 36 | setSitemapDirOpens: setSitemapDirOpens, 37 | checkSitemapDirOpens_by_id: checkSitemapDirOpens_by_id 38 | } 39 | })(); -------------------------------------------------------------------------------- /src/js/cms_main/CMS_TabView.js: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------- /src/js/cms_main/CMS_UtilClass.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_UtilClass = {} 3 | CMS_UtilClass.HoverMenu = (function() { 4 | /* ---------- ---------- ---------- */ 5 | var c = function(_view,_float) { 6 | this.init(_view,_float); 7 | } 8 | var p = c.prototype; 9 | /* ---------- ---------- ---------- */ 10 | 11 | p.view; 12 | p.v; 13 | 14 | p.init = function(_view,_float) { 15 | this.view = _view; 16 | this.view.each(function (index, dom) { 17 | new CMS_UtilClass.HoverMenuClass($(this),_float); 18 | }); 19 | } 20 | 21 | return c; 22 | })(); 23 | CMS_UtilClass.HoverMenuClass = (function() { 24 | /* ---------- ---------- ---------- */ 25 | var c = function(_view,_float) { 26 | this.init(_view,_float); 27 | } 28 | var p = c.prototype; 29 | /* ---------- ---------- ---------- */ 30 | 31 | p.view; 32 | p.v; 33 | 34 | p.init = function(_view,_float) { 35 | this.view = _view; 36 | this.float = _float; 37 | var self = this; 38 | this.view.hover(function(){ 39 | self.show($(this)); 40 | },function(){ 41 | self.hide($(this)); 42 | }) 43 | } 44 | p.tID; 45 | p.show = function(_tar){ 46 | var self = this; 47 | if(self.tID) clearTimeout(self.tID); 48 | self.tID = setTimeout(function(){ 49 | _tar.find(self.float).show(); 50 | },200); 51 | } 52 | p.hide = function(_tar){ 53 | var self = this; 54 | if(self.tID) clearTimeout(self.tID); 55 | self.tID = setTimeout(function(){ 56 | _tar.find(self.float).hide(); 57 | },200); 58 | } 59 | 60 | return c; 61 | })(); 62 | 63 | -------------------------------------------------------------------------------- /src/js/cms_main/HTMLService.2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/HTMLService.2.js -------------------------------------------------------------------------------- /src/js/cms_main/HTMLService.3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/HTMLService.3.js -------------------------------------------------------------------------------- /src/js/cms_main/NO_CMSView.js: -------------------------------------------------------------------------------- 1 | 2 | var NO_CMS = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | stageInit(); 8 | } 9 | 10 | /* ---------- ---------- ---------- */ 11 | 12 | function createlayout(){ 13 | var tag = ""; 14 | tag += '
'; 15 | tag += '
'+ SITE_NAME +'
'; 16 | tag += '
お使いのブラウザでは、CMSの管理画面はご利用いただけません。
'; 17 | tag += '
管理画面を利用するには、以下のブラウザをお使いください。
'; 18 | tag += '
※モバイル端末は対応していません。
'; 19 | tag += '
対応ブラウザ
'; 20 | tag += '

'; 24 | tag += '
JS CMSの紹介サイト
' 25 | tag += '
'; 26 | $("body").html(tag); 27 | } 28 | 29 | function setBtn(){ 30 | } 31 | 32 | /* ---------- ---------- ---------- */ 33 | 34 | var isOpen = false; 35 | var isFirst = true; 36 | function stageInit(){ 37 | } 38 | function stageIn(){ 39 | if(! isOpen){ isOpen = true; 40 | if(isFirst){ 41 | createlayout(); 42 | setBtn(); 43 | } 44 | isFirst = false; 45 | } 46 | } 47 | function stageOut(){ 48 | if(isOpen){ isOpen = false; 49 | } 50 | } 51 | 52 | return { init:init, stageIn:stageIn, stageOut:stageOut } 53 | })(); -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMSView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMSView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_AssetStage.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_AssetStage.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_DirArea.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_DirArea.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileEditorView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileEditorView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileEditorView.p2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileEditorView.p2.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileEditorView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileEditorView.p3.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileEditorView.p4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileEditorView.p4.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileEditorView.p5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileEditorView.p5.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileListView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileListView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileListView.p2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileListView.p2.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileListView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileListView.p3.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileListView.p4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileListView.p4.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FileListView.p5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FileListView.p5.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_FilesArea.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_FilesArea.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_SettingEditorView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_SettingEditorView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_SettingListView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_SettingListView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_Asset_SettingsArea.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_Asset_SettingsArea.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingClass.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingClass.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingDB.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingDB.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingListView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingListView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_AssetFileMC.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_AssetFileMC.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_AssetGroup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_AssetGroup.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_AssetView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_AssetView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_SettingView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_SettingView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_TemplateGroup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_TemplateGroup.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingList_TemplateView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingList_TemplateView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingStage.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingStage.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingView.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingsView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingsView.p3.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingsView.p4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingsView.p4.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/CMS_SettingsView.p5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/CMS_SettingsView.p5.js -------------------------------------------------------------------------------- /src/js/cms_main/_trash/TemplateFilesEditor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/_trash/TemplateFilesEditor.js -------------------------------------------------------------------------------- /src/js/cms_main/misk.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/misk.js -------------------------------------------------------------------------------- /src/js/cms_main/misk2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/misk2.js -------------------------------------------------------------------------------- /src/js/cms_main/misk3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_main/misk3.js -------------------------------------------------------------------------------- /src/js/cms_model/Model.last.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.js: -------------------------------------------------------------------------------- 1 | 2 | var PageElement = {} 3 | window.PageElement = PageElement; 4 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.layout.colDiv.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.layout.colDiv = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "layout.colDiv", 9 | name : "段組みセル", 10 | name2 : "<TD>", 11 | inputs : ["CLASS","CSS"], 12 | cssDef : {selector:".cms-column-col"} 13 | }); 14 | 15 | /* ---------- ---------- ---------- */ 16 | 17 | _.getInitData = function(){ 18 | return {}; 19 | } 20 | 21 | /* ---------- ---------- ---------- */ 22 | 23 | _.getPreview = function(_o){ 24 | return ""; 25 | } 26 | 27 | /* ---------- ---------- ---------- */ 28 | 29 | _.getHTML = function(_o,_tab){ 30 | return ""; 31 | } 32 | 33 | /* ---------- ---------- ---------- */ 34 | 35 | return _; 36 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.layout.cols.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.layout.cols = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "layout.cols", 9 | name : "段組み", 10 | name2 : "<TABLE>", 11 | inputs : ["CLASS","CSS"], 12 | cssDef : {selector:".cms-column"} 13 | }); 14 | 15 | /* ---------- ---------- ---------- */ 16 | 17 | _.getInitData = function(_param){ 18 | var _p = PageElement_JText.P; 19 | var n = Number(_param); 20 | 21 | var o = {}; 22 | o.type = _.pageInfo.id; 23 | o.data = []; 24 | o.attr ={css:"col-p40",class:"col-p40"} 25 | for (var i = 0; i < n ; i++) { 26 | o.data.push({ 27 | type: "layout.div", 28 | attr: { 29 | style: "" 30 | }, 31 | data: [{ 32 | type: "tag.p", 33 | attr: { 34 | "class": "default", 35 | css: "default" 36 | }, 37 | data: _p 38 | }] 39 | }); 40 | } 41 | return o; 42 | } 43 | 44 | /* ---------- ---------- ---------- */ 45 | 46 | _.getPreview = function(_o){ 47 | return ""; 48 | } 49 | 50 | /* ---------- ---------- ---------- */ 51 | 52 | _.getHTML = function(_o,_tab){ 53 | return ""; 54 | } 55 | 56 | /* ---------- ---------- ---------- */ 57 | 58 | return _; 59 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.layout.div.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.layout.div = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "layout.div", 9 | name : "コンテナ", 10 | name2 : "<DIV>", 11 | inputs : ["CLASS","CSS"], 12 | // cssDef : {file:"block",key:"[コンテナブロック]"}, 13 | cssDef : {selector:".cms-layout"} 14 | }); 15 | 16 | /* ---------- ---------- ---------- */ 17 | 18 | _.getInitData = function(){ 19 | var _p = PageElement_JText.P; 20 | 21 | var o = {}; 22 | o.type = _.pageInfo.id; 23 | o.data = [{ 24 | type: "tag.p", 25 | attr: { 26 | "class": "default", 27 | css: "default" 28 | }, 29 | data: _p 30 | }]; 31 | o.attr = { 32 | "class": "default p20 waku", 33 | css: "default p20 waku", 34 | style: "" 35 | } 36 | return o; 37 | } 38 | 39 | /* ---------- ---------- ---------- */ 40 | 41 | _.getPreview = function(_o){ 42 | return ""; 43 | } 44 | 45 | /* ---------- ---------- ---------- */ 46 | 47 | _.getHTML = function(_o,_tab){ 48 | return ""; 49 | } 50 | 51 | /* ---------- ---------- ---------- */ 52 | 53 | return _; 54 | })(); 55 | 56 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.layout.js: -------------------------------------------------------------------------------- 1 | PageElement.layout = {} 2 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.object.data_text.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.object.data_text = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "object.data_text", 9 | name : "生データ", 10 | name2 : "", 11 | inputs : ["TEXTAREA"] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | var s = "サンプルの文書ですので、ご注意ください。" 20 | o.data = s 21 | o.attr = {css:"",style:""} 22 | return o; 23 | } 24 | 25 | /* ---------- ---------- ---------- */ 26 | 27 | _.getPreview = function(_o){ 28 | var data = _o.data; 29 | var attr = _o.attrs; 30 | var tag = ""; 31 | 32 | tag += '
\n' 33 | tag += '
データブロック / TEXTデータ
' 34 | tag += '
データブロックは、[公開する]でHTML公開しても、書出されません。
ブロック情報パネルの、[出力]タブよりファイル名を設定し、書出せます。
' 35 | tag += '
\n' 36 | if(data == ""){ 37 | tag += 'データリストを入力...' 38 | } else{ 39 | tag += '\n' 40 | tag += '\n' 41 | tag += '\n' 42 | tag += '\n"; 45 | tag += "\n"; 46 | tag += "\n"; 47 | tag += "
\n' 43 | tag += CMS_TagU.tag_2_t(data).split("\n").join("
"); 44 | tag += "
\n"; 48 | } 49 | tag += "
\n"; 50 | tag += "
\n"; 51 | 52 | return tag; 53 | } 54 | 55 | /* ---------- ---------- ---------- */ 56 | 57 | _.getHTML = function(_o,_tab){ 58 | var data = _o.data; 59 | var attr = _o.attrs; 60 | // var tab = (_tab != undefined) ? _tab:""; 61 | var tag = "" 62 | tag += data; 63 | return tag; 64 | } 65 | 66 | /* ---------- ---------- ---------- */ 67 | 68 | return _; 69 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.object.feed_memo.txt: -------------------------------------------------------------------------------- 1 | 2 | RSSテスト 3 | http://www.feb1976.com/temp/test.xml 4 | http://www.honda.co.jp/rss/hotnews.xml 5 | http://192.168.1.23:999/develop/test.xml 6 | http://www.pixelimage.jp/blog/atom.xml 7 | 8 | http://feeds.gizmodo.jp/rss/gizmodo/index.xml 9 | http://feeds.gizmodo.jp/rss/gizmodo/atom.xml 10 | 11 | http://www.bingo-cms.jp/rss.php 12 | http://www.chem-station.com/feed 13 | http://images.apple.com/main/rss/hotnews/hotnews.rss 14 | http://blog.heteml.jp/?feed=rss2 15 | 16 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.object.imageTexts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_model/PageElement.object.imageTexts.js -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.object.js: -------------------------------------------------------------------------------- 1 | PageElement.object = {} 2 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.object.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_model/PageElement.object.test.js -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.replace.div.js: -------------------------------------------------------------------------------- 1 | PageElement.replace.div = (function(){ 2 | var _ = new PageModel.Tag_(); 3 | 4 | /* ---------- ---------- ---------- */ 5 | 6 | _.pageInfo = new PageModel.Object_Info({ 7 | id : "replace.div", 8 | name : "Myタグ-コンテナ定義", 9 | name2 : "", 10 | inputs : [], 11 | // cssDef : {file:"block",key:"[コンテナブロック]"}, 12 | cssDef : {selector:".cms-replace-div"} 13 | }); 14 | 15 | /* ---------- ---------- ---------- */ 16 | 17 | _.getInitData = function(){ 18 | var _p = PageElement_JText.P; 19 | 20 | var o = {}; 21 | o.type = _.pageInfo.id; 22 | o.data = [{ 23 | type: "tag.p", 24 | attr: { 25 | "class": "default", 26 | css: "default" 27 | }, 28 | data: _p 29 | }]; 30 | o.attr = { 31 | "class": "_cms_replace", 32 | css: " _cms_replace", 33 | style: "", 34 | replaceID: "ID名を入力", 35 | replaceTitle: "説明を入力" 36 | } 37 | return o; 38 | } 39 | 40 | /* ---------- ---------- ---------- */ 41 | 42 | _.getPreview = function(_o){ 43 | return ""; 44 | } 45 | 46 | /* ---------- ---------- ---------- */ 47 | 48 | _.getHTML = function(_o,_tab){ 49 | return ""; 50 | } 51 | 52 | /* ---------- ---------- ---------- */ 53 | 54 | return _; 55 | })(); 56 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.replace.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.replace = {} 3 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.h1.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.h1 = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.h1", 9 | name : "タイトル", 10 | inputs : ["INPUT"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "タイトル タイトル"; 19 | o.attr = { css:"default" } 20 | return o; 21 | } 22 | 23 | /* ---------- ---------- ---------- */ 24 | 25 | _.getPreview = function(_o){ 26 | var data = _o.data; 27 | var attr = _o.attrs; 28 | var tag = "" 29 | if(data == "") { 30 | tag += 'テキストを入力...'; 31 | } else{ 32 | tag += '

' + data.split("\n").join("
\n") + '

' 33 | } 34 | return tag; 35 | } 36 | 37 | /* ---------- ---------- ---------- */ 38 | 39 | _.getHTML = function(_o,_tab){ 40 | return "" 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | return _; 46 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.h2.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.h2 = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.h2", 9 | name : "タイトル", 10 | inputs : ["INPUT"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "タイトル タイトル"; 19 | o.attr = { css:"default" } 20 | return o; 21 | } 22 | 23 | /* ---------- ---------- ---------- */ 24 | 25 | _.getPreview = function(_o){ 26 | var data = _o.data; 27 | var attr = _o.attrs; 28 | var tag = "" 29 | if(data == "") { 30 | tag += 'テキストを入力...'; 31 | } else{ 32 | tag += '

' + data.split("\n").join("
\n") + '

' 33 | } 34 | return tag; 35 | } 36 | 37 | /* ---------- ---------- ---------- */ 38 | 39 | _.getHTML = function(_o,_tab){ 40 | return "" 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | return _; 46 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.h3.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.h3 = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.h3", 9 | name : "タイトル", 10 | inputs : ["INPUT"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "タイトル タイトル"; 19 | o.attr = { css:"default" } 20 | return o; 21 | } 22 | 23 | /* ---------- ---------- ---------- */ 24 | 25 | _.getPreview = function(_o){ 26 | var data = _o.data; 27 | var attr = _o.attrs; 28 | var tag = "" 29 | if(data == "") { 30 | tag += 'テキストを入力...'; 31 | } else{ 32 | tag += '

' + data.split("\n").join("
\n") + '

' 33 | } 34 | return tag; 35 | } 36 | 37 | /* ---------- ---------- ---------- */ 38 | 39 | _.getHTML = function(_o,_tab){ 40 | return "" 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | return _; 46 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.h4.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.h4 = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.h4", 9 | name : "タイトル", 10 | inputs : ["INPUT"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "タイトル タイトル"; 19 | o.attr = { css:"default" } 20 | return o; 21 | } 22 | 23 | /* ---------- ---------- ---------- */ 24 | 25 | _.getPreview = function(_o){ 26 | var data = _o.data; 27 | var attr = _o.attrs; 28 | var tag = "" 29 | if(data == "") { 30 | tag += 'テキストを入力...'; 31 | } else{ 32 | tag += '

' + data.split("\n").join("
\n") + '

' 33 | } 34 | return tag; 35 | } 36 | 37 | /* ---------- ---------- ---------- */ 38 | 39 | _.getHTML = function(_o,_tab){ 40 | return "" 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | return _; 46 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.img.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.img = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.img", 9 | name : "画像", 10 | inputs : ["IMG"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "width:200,height:140" 19 | //o.attr = {style:"max-width:100%;"}; 20 | o.attr ={css:""} 21 | return o; 22 | } 23 | 24 | /* ---------- ---------- ---------- */ 25 | 26 | _.getPreview = function(_o){ 27 | var data = _o.data; 28 | var attr = _o.attrs; 29 | var jquery = _o.jquery; 30 | var link = _o.link; 31 | var id = _o.id 32 | var tag = "" 33 | 34 | if(data == ""){ 35 | tag += '画像URLを入力...' 36 | } else{ 37 | var imgTag = CMS_Path.MEDIA.getImageTag(data,false); 38 | var genTag = CMS_AnchorU.getWapperTag(link, imgTag,false); 39 | tag += PageElement.settingU.getTag(id,jquery,data,genTag); 40 | } 41 | return tag; 42 | } 43 | 44 | /* ---------- ---------- ---------- */ 45 | 46 | _.getHTML = function(_o,_tab){ 47 | } 48 | 49 | /* ---------- ---------- ---------- */ 50 | 51 | return _; 52 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.js: -------------------------------------------------------------------------------- 1 | PageElement.setting = {} 2 | 3 | PageElement.settingU = (function(){ 4 | function getTag(id,jquery,data,ss){ 5 | var json = JSON.stringify(data, null, "  ") 6 | json = json.split("\n").join("
") 7 | var tag = "" 8 | tag += '
' 9 | tag += '
プレビュー
' 10 | tag += '
' 11 | tag += '
'+ss+'
' 12 | tag += '
' 13 | if(id != ""){ 14 | tag += '
getFreeData("'+id+'")とJSファイルで記述すると、以下のデータが取得できます
' 15 | tag += '
'+ json +'
' 16 | } 17 | if(jquery != ""){ 18 | tag += '
HTML内の'+jquery+' に該当するノードに対して、以下のテキストが出力されます
' 19 | tag += '
' 20 | tag += CMS_TagU.tag_2_t(ss).split("\n").join("
") 21 | tag += '
' 22 | } 23 | tag += '
' 24 | return tag; 25 | } 26 | 27 | return { getTag:getTag } 28 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.note.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.note = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.note", 9 | name : "ノート", 10 | inputs : ["TEXTAREA"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = "この文書はサンプルのテキストです。注釈ノートとして利用します。" 19 | o.attr = {css:"default"} 20 | return o; 21 | } 22 | 23 | 24 | /* ---------- ---------- ---------- */ 25 | 26 | _.getPreview = function(_o){ 27 | var data = _o.data; 28 | var attr = _o.attrs; 29 | var tag = "" 30 | if(data == "") { 31 | tag += 'テキストを入力...'; 32 | } else{ 33 | tag += '
' + data.split("\n").join("
\n") + '
' 34 | } 35 | return tag; 36 | } 37 | 38 | /* ---------- ---------- ---------- */ 39 | 40 | _.getHTML = function(_o,_tab){ 41 | return ""; 42 | } 43 | 44 | /* ---------- ---------- ---------- */ 45 | 46 | return _; 47 | })(); 48 | 49 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.setting.p.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.setting.p = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "setting.p", 9 | name : "文書", 10 | inputs : ["TEXTAREA"] 11 | }); 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | _.getInitData = function(){ 16 | var o = {}; 17 | o.type = _.pageInfo.id; 18 | o.data = PageElement_JText.P 19 | o.attr = {css:"default"} 20 | return o; 21 | } 22 | 23 | 24 | /* ---------- ---------- ---------- */ 25 | 26 | _.getPreview = function(_o){ 27 | var data = _o.data; 28 | var attr = _o.attrs; 29 | var jquery = _o.jquery; 30 | var id = _o.id 31 | 32 | var tag = "" 33 | if(data == "") { 34 | tag += 'テキストを入力...'; 35 | } else{ 36 | var genTag = data.split("\n").join("
\n") 37 | tag += PageElement.settingU.getTag(id,jquery,data,genTag); 38 | } 39 | return tag; 40 | } 41 | 42 | /* ---------- ---------- ---------- */ 43 | 44 | _.getHTML = function(_o,_tab){ 45 | return ""; 46 | } 47 | 48 | /* ---------- ---------- ---------- */ 49 | 50 | return _; 51 | })(); 52 | 53 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.anchor.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.anchor = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.anchor", 9 | name : "ページ内リンク", 10 | name2 : "<A>", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | o.data = "anchor_id"; 20 | o.attr = {}; 21 | return o; 22 | } 23 | 24 | 25 | /* ---------- ---------- ---------- */ 26 | 27 | _.getPreview = function(_o){ 28 | var data = _o.data; 29 | var attr = _o.attrs; 30 | var tag = "" 31 | if(data == ""){ 32 | tag += 'IDを入力...' 33 | } else{ 34 | tag += '
' + data + '
'; 35 | } 36 | return tag; 37 | } 38 | 39 | /* ---------- ---------- ---------- */ 40 | 41 | _.getHTML = function(_o,_tab){ 42 | var data = _o.data; 43 | var attr = _o.attrs; 44 | var tab = (_tab != undefined) ? _tab:""; 45 | var tag = "" 46 | tag += tab+'
 
'; 47 | return tag; 48 | } 49 | 50 | /* ---------- ---------- ---------- */ 51 | 52 | return _; 53 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.blockquote.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.blockquote = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.blockquote", 9 | name : "引用", 10 | name2 : "<BLOCKQUOTE>", 11 | inputs : ["TEXTAREA","CLASS","CSS"], 12 | // cssDef : {file:"block",key:"[引用ブロック]"} 13 | cssDef : {selector:".cms-bq"} 14 | }); 15 | 16 | /* ---------- ---------- ---------- */ 17 | 18 | _.getInitData = function(){ 19 | var o = {}; 20 | o.type = _.pageInfo.id; 21 | o.data = '文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。\n文書が入ります。文書が入ります。文書が入ります。' 22 | o.attr = { css:"default" } 23 | o.attr.class = o.attr.css; 24 | return o; 25 | } 26 | 27 | 28 | /* ---------- ---------- ---------- */ 29 | 30 | _.getPreview = function(_o){ 31 | var data = _o.data; 32 | var attr = _o.attrs; 33 | attr = attr.split('class="').join('class="cms-bq '); 34 | var tag = ""; 35 | if(data == "") { 36 | tag += 'テキストを入力...'; 37 | } else{ 38 | tag += '
' + data.split("\n").join("
\n") + '
'; 39 | } 40 | return tag; 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | _.getHTML = function(_o,_tab){ 46 | var data = _o.data; 47 | var attr = _o.attrs; 48 | attr = attr.split('class="').join('class="cms-bq '); 49 | var tab = (_tab != undefined) ? _tab:""; 50 | var tag = "" 51 | tag += tab + '
' + data.split("\n").join("
\n" + tab) + '
\n' ; 52 | return tag; 53 | } 54 | 55 | /* ---------- ---------- ---------- */ 56 | 57 | return _; 58 | })(); 59 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.btn.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.btn = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.btn", 9 | name : "ボタン", 10 | name2 : "<A>", 11 | inputs : ["CLASS","CSS"], 12 | cssDef : {selector:".cms-btn"} 13 | }); 14 | 15 | /* ---------- ---------- ---------- */ 16 | 17 | _.getInitData = function(_param){ 18 | var o = {}; 19 | o.type = _.pageInfo.id; 20 | o.data = CMS_AnchorU.getInitData(); 21 | o.data.href="#" 22 | 23 | if(_param){ 24 | o.data.href = _param.url; 25 | o.data.text = URL_U.getFileName(_param.url); 26 | } 27 | o.attr = {} 28 | return o; 29 | } 30 | 31 | /* ---------- ---------- ---------- */ 32 | 33 | _.getPreview = function(_o){ 34 | var data = _o.data; 35 | var attr = _o.attrs; 36 | attr = attr.split('class="').join('class="cms-btn '); 37 | var tag = "" 38 | tag += '
' + CMS_AnchorU.getAnchorTag(data,"",false,true) + '
'; 39 | return tag; 40 | } 41 | 42 | /* ---------- ---------- ---------- */ 43 | 44 | _.getHTML = function(_o,_tab){ 45 | var data = _o.data; 46 | var attr = _o.attrs; 47 | attr = attr.split('class="').join('class="cms-btn '); 48 | var tab = (_tab != undefined) ? _tab:""; 49 | 50 | var idTag = "" 51 | if(_o.id) idTag = ' id="'+_o.id+'"'; 52 | var tag = ""; 53 | tag += _tab + '
' + CMS_AnchorU.getAnchorTag(data , idTag,true,true) + '
'; 54 | 55 | return tag; 56 | } 57 | 58 | /* ---------- ---------- ---------- */ 59 | 60 | return _; 61 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.code.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.code = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.code", 9 | name : "コード", 10 | name2 : "<CODE>", 11 | inputs : ["CAPTION","CLASS","CSS"], 12 | // cssDef : {file:"block",key:"[コードブロック]"} 13 | cssDef : {selector:".cms-code"} 14 | }); 15 | 16 | /* ---------- ---------- ---------- */ 17 | 18 | _.getInitData = function(){ 19 | var o = {}; 20 | o.type = _.pageInfo.id; 21 | o.data = 'var s = "hello world!";' 22 | o.attr = { css:"default " } 23 | o.attr.class = o.attr.css; 24 | return o; 25 | } 26 | 27 | /* ---------- ---------- ---------- */ 28 | 29 | _.getPreview = function(_o){ 30 | var data = _o.data; 31 | var attr = _o.attrs; 32 | attr = attr.split('class="').join('class="cms-code '); 33 | var extra = _o.extra; 34 | 35 | var tag = ""; 36 | if(data == "") { 37 | tag += 'テキストを入力...'; 38 | } else{ 39 | tag += '
\n'; 40 | tag += PageElement_Util.getCaption(extra); 41 | tag += '' + _core(data) + '\n'; 42 | tag += '
\n'; 43 | } 44 | return tag; 45 | } 46 | 47 | /* ---------- ---------- ---------- */ 48 | 49 | _.getHTML = function(_o,_tab){ 50 | var data = _o.data; 51 | var attr = _o.attrs; 52 | attr = attr.split('class="').join('class="cms-code '); 53 | var extra = _o.extra; 54 | 55 | var tab = (_tab != undefined) ? _tab:""; 56 | var tag = "" 57 | tag += '
\n'; 58 | tag += PageElement_Util.getCaption(extra); 59 | tag += '' + _core(data) + '\n'; 60 | tag += '
\n'; 61 | return tag; 62 | } 63 | 64 | /* ---------- ---------- ---------- */ 65 | 66 | function _core(t){ 67 | t = t.split("&").join("&"); 68 | t = t.split("<").join("<"); 69 | t = t.split(">").join(">"); 70 | t = t.split("\t").join(' '); 71 | t = t.split("\n").join("
\n"); 72 | return t; 73 | } 74 | 75 | /* ---------- ---------- ---------- */ 76 | 77 | return _; 78 | })(); 79 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.html.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.html = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.html", 9 | name : "HTML", 10 | name2 : "", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | var s = "" 20 | s += '\n' 21 | s += 'HTML\n' 22 | s += '\n' 23 | s += '\n' 24 | s += '\n' 25 | o.data = s 26 | o.attr ={preview:""} 27 | return o; 28 | } 29 | 30 | /* ---------- ---------- ---------- */ 31 | 32 | _.getPreview = function(_o){ 33 | var data = _o.data; 34 | var attr = _o.attrs; 35 | var tag = ""; 36 | 37 | if(data == ""){ 38 | tag += 'HTML,JS,CSSデータを入力...' 39 | } else{ 40 | if(_o.preview) { 41 | tag += '
' + data + '
'; 42 | } else{ 43 | tag += '
'+CMS_TagU.tag_2_t(data).split("\n").join("
")+'
'; 44 | } 45 | } 46 | return tag; 47 | } 48 | 49 | /* ---------- ---------- ---------- */ 50 | 51 | _.getHTML = function(_o,_tab){ 52 | var data = _o.data; 53 | var attr = _o.attrs; 54 | var tab = (_tab != undefined) ? _tab:""; 55 | var tag = "" 56 | tag += data 57 | // tag += data; 58 | return tag; 59 | } 60 | 61 | /* ---------- ---------- ---------- */ 62 | 63 | return _; 64 | })(); 65 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag = {} -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.js.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.js = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.js", 9 | name : "JavaScript", 10 | name2 : "", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | var s = "" 20 | s += '//ページ公開時に、JavaScriptコードを実行し、返り値を出力します。\n\n'; 21 | s += '(function(_param){\n'; 22 | s += ' var tag = "";\n'; 23 | s += ' var a = _param["{1}"];\n'; 24 | s += ' var b = _param["{2}"];\n'; 25 | s += ' return a + b;\n'; 26 | s += '});\n'; 27 | o.data = s; 28 | o.attr = { } 29 | // o.attr ={ } 30 | return o; 31 | } 32 | 33 | /* ---------- ---------- ---------- */ 34 | 35 | _.getPreview = function(_o){ 36 | var data = _o.data; 37 | var attr = _o.attrs; 38 | var tag = ""; 39 | 40 | if(data == ""){ 41 | tag += 'JavaScriptを入力...' 42 | } else{ 43 | tag += '
' 44 | tag += '
' 45 | tag += CMS_TagU.tag_2_t(data).split("\n").join("
") 46 | tag += '
'; 47 | tag += '
※ 上記のJavaScriptは、ページ公開時などに実行され、return が出力されます。
'; 48 | tag += '
'; 49 | } 50 | return tag; 51 | } 52 | 53 | /* ---------- ---------- ---------- */ 54 | 55 | _.getHTML = function(_o,_tab){ 56 | var data = _o.data; 57 | var attr = _o.attrs; 58 | // var tab = (_tab != undefined) ? _tab:""; 59 | // throw new Error(); 60 | var tag = ""; 61 | try{ 62 | var jsparam = CMS_Data.HinagataSearvice.getJSParam(); 63 | tag += eval(data)(jsparam); 64 | } catch( e ){ } 65 | return tag; 66 | } 67 | 68 | /* ---------- ---------- ---------- */ 69 | 70 | return _; 71 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.margin.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.margin = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.margin", 9 | name : "高さマージン", 10 | name2 : "<DIV>", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | o.data = "20px"; 20 | o.attr ={css:"default"} 21 | o.attr.class = o.attr.css; 22 | return o; 23 | } 24 | 25 | /* ---------- ---------- ---------- */ 26 | 27 | _.getPreview = function(_o){ 28 | var data = _o.data; 29 | var attr = _o.attrs; 30 | attr = attr.split('class="').join('class="cms-margin '); 31 | var tag = "" 32 | 33 | if(data == ""){ 34 | tag += '数値を入力...' 35 | } else{ 36 | data = data.split(" ").join(""); 37 | if(data.charAt(0) == "-"){ 38 | attr = attr.split('style="').join('style="height:15px;"'); 39 | } else{ 40 | attr = attr.split('style="').join('style="height:'+data+'"'); 41 | } 42 | } 43 | tag += '
マージン'+data+'
\n'; 44 | return tag; 45 | } 46 | 47 | /* ---------- ---------- ---------- */ 48 | 49 | _.getHTML = function(_o,_tab){ 50 | var data = _o.data; 51 | var attr = _o.attrs; 52 | attr = attr.split('class="').join('class="cms-margin '); 53 | // 54 | var tag = ""; 55 | data = data.split(" ").join(""); 56 | if(data.charAt(0) == "-"){ 57 | attr += ' style="height:0px;margin-top:'+data+'"'; 58 | } else{ 59 | attr += ' style="height:'+data+'"'; 60 | } 61 | tag += '
\n'; 62 | return tag; 63 | } 64 | 65 | /* ---------- ---------- ---------- */ 66 | 67 | return _; 68 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.markdown.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.markdown = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.markdown", 9 | name : "フリーテキスト", 10 | name2 : "<Markdown>", 11 | inputs : ["CLASS","CSS"], 12 | // cssDef : {file:"block",key:"[フリーテキストブロック]"} 13 | cssDef : {selector:".cms-markdown"} 14 | }); 15 | 16 | /* ---------- ---------- ---------- */ 17 | 18 | _.getInitData = function(){ 19 | var o = {}; 20 | o.type = _.pageInfo.id; 21 | var s = this.getInitText(); 22 | o.data = s 23 | o.attr = { css:"default " } 24 | o.attr.class = o.attr.css; 25 | return o; 26 | } 27 | /* ---------- ---------- ---------- */ 28 | 29 | _.getInitText = function(){ 30 | var s = ""; 31 | s += '#タイトル\n'; 32 | s += '\n'; 33 | s += '##大見出し\n'; 34 | s += '文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。\n'; 35 | s += '\n'; 36 | s += '###中見出し\n'; 37 | s += '文書が入ります。文書が入ります。文書が入ります。文書が入ります。\n'; 38 | s += '\n'; 39 | s += '####小見出し\n'; 40 | s += '文書が入ります。文書が入ります。文書が入ります。\n'; 41 | s += '\n'; 42 | s += ' * 項目1\n'; 43 | s += ' * 項目2\n'; 44 | s += ' * 項目3\n'; 45 | s += ''; 46 | return s 47 | } 48 | 49 | /* ---------- ---------- ---------- */ 50 | 51 | _.getPreview = function(_o){ 52 | var data = _o.data; 53 | var attr = _o.attrs; 54 | attr = attr.split('class="').join('class="cms-markdown ') 55 | var tag = ""; 56 | if(data == ""){ 57 | tag += 'マークダウンデータを入力...' 58 | } else{ 59 | tag += '
' + marked(data) + '
'; 60 | } 61 | return tag; 62 | } 63 | 64 | /* ---------- ---------- ---------- */ 65 | 66 | _.getHTML = function(_o,_tab){ 67 | var data = _o.data; 68 | var attr = _o.attrs; 69 | attr = attr.split('class="').join('class="cms-markdown ') 70 | var tab = (_tab != undefined) ? _tab:""; 71 | var s = marked(data); 72 | s = s.split('id="-"').join(""); 73 | var tag = "" 74 | tag += '
' + s + '
'; 75 | return tag; 76 | } 77 | 78 | /* ---------- ---------- ---------- */ 79 | 80 | return _; 81 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.note.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.note = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.note", 9 | name : "制作用ノート", 10 | name2 : "", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | o.data = "このテキストは制作用のノートです。HTMLには出力されません。"; 20 | o.attr ={} 21 | return o; 22 | } 23 | 24 | 25 | /* ---------- ---------- ---------- */ 26 | 27 | _.getPreview = function(_o){ 28 | var data = _o.data; 29 | var attr = _o.attrs; 30 | var tag = "" 31 | 32 | if(data == ""){ 33 | tag += '制作用ノートを入力...' 34 | } else{ 35 | tag += '
制作用ノート:' + CMS_TagU.t_2_tag(data) + '
'; 36 | } 37 | return tag; 38 | } 39 | 40 | /* ---------- ---------- ---------- */ 41 | 42 | _.getHTML = function(_o,_tab){ 43 | return ""; 44 | } 45 | 46 | /* ---------- ---------- ---------- */ 47 | 48 | return _; 49 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.p.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.p = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.p", 9 | name : "文書", 10 | name2 : "<P>", 11 | inputs : ["TEXTAREA","CLASS","CSS"], 12 | // cssDef : { file:"block",key:"[文書ブロック]",tag:"p"} 13 | cssDef : {selector:".cms-p"} 14 | }); 15 | 16 | /* ---------- ---------- ---------- */ 17 | 18 | _.getInitData = function(_param){ 19 | var o = {}; 20 | o.type = _.pageInfo.id; 21 | o.data = PageElement_JText.P 22 | o.attr = { css:"default " } 23 | o.attr.class = o.attr.css; 24 | 25 | if(_param){ 26 | o.data = _param.text; 27 | } 28 | return o; 29 | } 30 | 31 | 32 | /* ---------- ---------- ---------- */ 33 | 34 | _.getPreview = function(_o){ 35 | var data = _o.data; 36 | var attr = _o.attrs; 37 | attr = attr.split('class="').join('class="cms-p '); 38 | var tag = ""; 39 | if(data == "") { 40 | tag += 'テキストを入力...'; 41 | } else{ 42 | tag += '
'; 43 | tag += '

' + data.split("\n").join("
\n") + '

'; 44 | tag += '
'; 45 | } 46 | return tag; 47 | } 48 | 49 | /* ---------- ---------- ---------- */ 50 | 51 | _.getHTML = function(_o,_tab){ 52 | var data = _o.data; 53 | var attr = _o.attrs; 54 | attr = attr.split('class="').join('class="cms-p '); 55 | var tab = (_tab != undefined) ? _tab:""; 56 | var tag = "" 57 | tag += tab + '

' + data.split("\n").join("
\n" + tab) + '

\n' ; 58 | return tag; 59 | } 60 | 61 | /* ---------- ---------- ---------- */ 62 | 63 | return _; 64 | })(); 65 | -------------------------------------------------------------------------------- /src/js/cms_model/PageElement.tag.place.js: -------------------------------------------------------------------------------- 1 | 2 | PageElement.tag.place = (function(){ 3 | var _ = new PageModel.Tag_(); 4 | 5 | /* ---------- ---------- ---------- */ 6 | 7 | _.pageInfo = new PageModel.Object_Info({ 8 | id : "tag.place", 9 | name : "制作用アタリ", 10 | name2 : "", 11 | inputs : [] 12 | }); 13 | 14 | /* ---------- ---------- ---------- */ 15 | 16 | _.getInitData = function(){ 17 | var o = {}; 18 | o.type = _.pageInfo.id; 19 | o.data = "このテキストは制作用のアタリです。HTMLに出力されます。"; 20 | // o.attr ={width:"",height:"200px"} 21 | o.attr = {} 22 | o.extra = {width:"",height:"200px"}; 23 | return o; 24 | } 25 | 26 | 27 | /* ---------- ---------- ---------- */ 28 | 29 | _.getPreview = function(_o) { 30 | var data = _o.data; 31 | var attr = _o.attrs; 32 | 33 | var extra = _o.extra; 34 | var tag = "" 35 | 36 | if (data == "") { 37 | tag += 'アタリ...'; 38 | } else { 39 | var _t = '

{V}

\n'; 40 | var _w = (extra["width"]) ? "width:" + extra.width + ";" : ""; 41 | var _h = (extra["height"]) ? "height:" + extra.height + ";" : ""; 42 | _t = _t.split("{W}").join(_w); 43 | _t = _t.split("{H}").join(_h); 44 | _t = _t.split("{V}").join(CMS_TagU.t_2_tag(data)); 45 | tag += _t; 46 | } 47 | return tag; 48 | } 49 | 50 | /* ---------- ---------- ---------- */ 51 | 52 | _.getHTML = function(_o,_tab){ 53 | var data = _o.data; 54 | var attr = _o.attrs; 55 | var extra = _o.extra; 56 | var tab = (_tab != undefined) ? _tab:""; 57 | var tag = "" 58 | 59 | var _t = '

{V}

\n'; 60 | var _w = (extra["width"]) ? "width:" + extra.width + ";" : ""; 61 | var _h = (extra["height"]) ? "height:" + extra.height + ";" : ""; 62 | _t = _t.split("{W}").join(_w); 63 | _t = _t.split("{H}").join(_h); 64 | _t = _t.split("{V}").join(CMS_TagU.t_2_tag(data)); 65 | tag += tab+_t; 66 | return tag; 67 | } 68 | 69 | /* ---------- ---------- ---------- */ 70 | 71 | return _; 72 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageElement_Dic.js: -------------------------------------------------------------------------------- 1 | 2 | var PageElement_DIC = [] 3 | 4 | window.PageElement_DIC = PageElement_DIC; 5 | -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.OG_Cell.js: -------------------------------------------------------------------------------- 1 | 2 | PageModel.OG_Cell = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_view) { 5 | this.init(_view); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.param; 11 | p.id; 12 | p.name; 13 | p.type;//入力タイプ 14 | p.view; //detail:詳細編集画面の項目, one :マルチグリッド時にサマリーで表示する項目 15 | p.def;//初期値をいれる 16 | p.note;//注釈 17 | p.vals;//セレクトボックスのアイテムs 18 | p.placeholder; 19 | 20 | p.list;//候補リスト 21 | p.codeType;//フォームのコードの種類。HTML,CSS,JSなど 22 | p.style; 23 | //p.class_; 24 | p.init = function(o) { 25 | this.param = o; 26 | this.setParam(); 27 | } 28 | 29 | p.setParam = function (){ 30 | this.id = defaultVal(this.param.id, "--"); 31 | this.name = defaultVal(this.param.name, "-"); 32 | this.type = defaultVal(this.param.type, CELL_TYPE.SINGLE); 33 | this.view = defaultVal(this.param.view, ""); 34 | this.def = defaultVal(this.param.def, ""); 35 | this.note = defaultVal(this.param.note, ""); 36 | 37 | this.list = defaultVal(this.param.list, ""); 38 | this.style = defaultVal(this.param.style, ""); 39 | //this.class_ = defaultVal(this.param.class_, ""); 40 | this.vals = defaultVal(this.param.vals, ["--"]); 41 | this.placeholder = defaultVal(this.param.placeholder, ""); 42 | // 43 | var ts = this.type.split(",") 44 | this.type = ts[0] 45 | this.codeType = "text"; 46 | if(ts[1]){ this.codeType = ts[1]; } 47 | } 48 | p.getTestTag = function() { 49 | var tag = ""; 50 | tag += ''; 51 | tag += '' + this.id + ''; 52 | tag += '' + this.name + ''; 53 | tag += '' + this.type + ''; 54 | tag += '' + this.view + ''; 55 | tag += '' + this.def + ''; 56 | tag += '' + this.note + ''; 57 | 58 | tag += '' + this.list + ''; 59 | tag += '' + this.style + ''; 60 | //tag += '' + this.class_ + ''; 61 | tag += '' + this.vals + ''; 62 | tag += ''; 63 | return tag; 64 | } 65 | return c; 66 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.OG_SubInfo.js: -------------------------------------------------------------------------------- 1 | 2 | PageModel.OG_SubInfo = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(o) { 5 | this.init(o); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.param; 11 | p.name; 12 | p.note; 13 | p.sub; 14 | p.image; 15 | 16 | p.init = function (o) { 17 | this.param = o; 18 | this.name; 19 | this.note; 20 | this.sub; 21 | this.image;//BaseGridのサイドに表示される 22 | this.image2;// 23 | this.setParam(); 24 | } 25 | p.setParam = function (){ 26 | this.name = defaultVal(this.param.name, ""); 27 | this.note = defaultVal(this.param.note, ""); 28 | this.sub = defaultVal(this.param.sub, ""); 29 | this.image = defaultVal(this.param.image, ""); 30 | this.freeHTML = defaultVal(this.param.freeHTML, ""); 31 | } 32 | p.getHeadTag = function (){ 33 | var tag = "" 34 | tag += '
' 35 | if(this.name != "")tag += '
'+this.name +'
' 36 | if(this.note != "")tag += '
'+this.note +'
' 37 | if(this.freeHTML != "")tag += this.freeHTML; 38 | 39 | tag += '
' 40 | return tag; 41 | } 42 | p.getFootTag = function (){ 43 | var tag = "" 44 | tag += '
' 45 | if(this.sub != ""){ 46 | tag += '
'+this.sub +'
' 47 | } 48 | tag += '
' 49 | return tag; 50 | 51 | } 52 | p.getTestTag = function (){ 53 | var tag = "" 54 | tag += ''; 55 | tag += ' '; 56 | tag += ' '; 57 | tag += ' '; 58 | tag += ' '; 59 | tag += '
name' + this.name + '
note' + this.note + '
sub' + this.sub + '
image' + this.image + '
'; 60 | return tag; 61 | } 62 | 63 | //BaseGridのサイドに表示される 64 | p.getGuideImageTag = function (){ 65 | var tag = ""; 66 | // if(this.image) tag += '' 67 | if(this.image) tag += this.image 68 | return tag; 69 | } 70 | return c; 71 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.Object_.js: -------------------------------------------------------------------------------- 1 | 2 | PageModel.Object_ = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function() { 5 | this.init(); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.param 11 | p.pageType 12 | p.pageInfo 13 | p.grids 14 | 15 | p.init = function() { 16 | } 17 | p.getInitData = function() { 18 | //overrdie 19 | } 20 | p.getPreview = function() { 21 | //overrdie 22 | return ""; 23 | } 24 | p.getHTML = function() { 25 | //overrdie 26 | return ""; 27 | } 28 | p.getDefData = function(_n) { 29 | var _param = {} 30 | for (var i = 0; i < this.grids.length ; i++) { 31 | this.grids[i].getInitData(_param,_n); 32 | } 33 | return _param; 34 | } 35 | p.getTestTag = function() { 36 | var infoTag = this.pageInfo.getTestTag(); 37 | var gridTag = "" 38 | var list = this.grids; 39 | for (var i = 0; i < list.length; i++) { 40 | gridTag += list[i].getTestTag() 41 | } 42 | var tag = "" 43 | tag += infoTag 44 | tag += gridTag 45 | return tag; 46 | } 47 | return c; 48 | })(); 49 | -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.Object_Info.js: -------------------------------------------------------------------------------- 1 | 2 | PageModel.Object_Info = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(o) { 5 | this.init(o); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.param 11 | p.id; 12 | p.name; 13 | p.def; 14 | p.cssDef; 15 | 16 | p.init = function(o) { 17 | this.param = o; 18 | this.setParam(); 19 | } 20 | p.setParam = function (){ 21 | this.id = defaultVal(this.param.id, ""); 22 | this.custom = defaultVal(this.param.custom, false); 23 | this.name = defaultVal(this.param.name, ""); 24 | this.name2 = defaultVal(this.param.name2, ""); 25 | this.guide = defaultVal(this.param.guide, ""); 26 | this.def = defaultVal(this.param.def, ""); 27 | this.cssDef = defaultVal(this.param.cssDef, {file:"block",key:""}); 28 | this.inputs = defaultVal(this.param.inputs, []); 29 | 30 | var o = {} 31 | o.type = this.id; 32 | o.custom = this.custom; 33 | o.name = this.name; 34 | o.name2 = (this.name2) ? this.name2 :""; 35 | o.inputs = this.inputs; 36 | 37 | PageElement_DIC.push(o); 38 | } 39 | p.getHeadTag = function (){ 40 | var tag = "" 41 | tag += '
' 42 | tag += '
' 43 | return tag; 44 | } 45 | p.getGuideTag = function (){ 46 | var tag = "" 47 | if(this.guide){ 48 | if(window["CMS_GuideU"]){ 49 | tag = CMS_GuideU.getGuideTag(this.guide,"_BASE_"); 50 | } 51 | } 52 | return tag; 53 | } 54 | p.getFootTag = function (){ 55 | var tag = "" 56 | tag += '
' 57 | tag += '
' 58 | return tag; 59 | } 60 | p.getTestTag = function (){ 61 | var tag = ""; 62 | tag += '
' 63 | tag += 'id'+this.id +''; 64 | tag += 'name'+this.name +''; 65 | tag += 'def'+this.def +''; 66 | tag += '
' 67 | return tag; 68 | } 69 | p.getGuideImageTag = function (){ 70 | return ""; 71 | } 72 | return c; 73 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.Tag_.js: -------------------------------------------------------------------------------- 1 | 2 | PageModel.Tag_ = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function() { 5 | this.init(); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.param 11 | p.pageType 12 | p.pageInfo 13 | p.grids 14 | 15 | p.init = function() { 16 | } 17 | p.getInitData = function() { 18 | //overrdie 19 | } 20 | p.getPreview = function() { 21 | //overrdie 22 | return ""; 23 | } 24 | p.getHTML = function() { 25 | //overrdie 26 | return ""; 27 | } 28 | p.getTestTag = function() { 29 | return "--"; 30 | } 31 | return c; 32 | })(); -------------------------------------------------------------------------------- /src/js/cms_model/PageModel.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var PageModel = {}; 4 | window.PageModel = PageModel; 5 | 6 | -------------------------------------------------------------------------------- /src/js/cms_model/PageTypeList.free.js: -------------------------------------------------------------------------------- 1 | window.FREEPAGE_DEF_DATA = [ 2 | 3 | { 4 | "type": "tag.heading", 5 | "data": { 6 | "heading": "h1", 7 | "main": { 8 | "text": "{{PAGE_NAME}}", 9 | "link": null 10 | }, 11 | "right": { 12 | "text": "", 13 | "link": null 14 | } 15 | }, 16 | "attr": { 17 | "css": "default", 18 | "narrow": "", 19 | "class": "default", 20 | "hide": "" 21 | } 22 | }, 23 | { 24 | "type": "tag.markdown", 25 | "data": "##大見出し\n文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。文書が入ります。\n\n###中見出し\n文書が入ります。文書が入ります。文書が入ります。文書が入ります。\n\n####小見出し\n文書が入ります。文書が入ります。文書が入ります。\n\n * 項目1\n * 項目2\n * 項目3\n", 26 | "attr": { 27 | "preview": "", 28 | "narrow": "", 29 | "class": "default", 30 | "hide": "", 31 | "css": "default " 32 | } 33 | } 34 | ] 35 | PageTypeList.page = (function(){ 36 | var _ = new PageModel.Object_(); 37 | 38 | /* ---------- ---------- ---------- */ 39 | 40 | _.pageInfo = new PageModel.Object_Info({ 41 | id : "free", 42 | name : "自由入力ページ", 43 | }); 44 | 45 | /* ---------- ---------- ---------- */ 46 | 47 | _.grids = [ 48 | /* ---------- ---------- ---------- */ 49 | new PageModel.Object_Grid({ 50 | gridType:Dic.GridType.FREE, 51 | gridInfo:new PageModel.OG_info({ 52 | id : "free", 53 | name : "自由入力エリア", 54 | def : [{ 55 | "type": "layout.div", 56 | "attr": {}, 57 | "data": FREEPAGE_DEF_DATA 58 | }] 59 | 60 | }) 61 | }) 62 | /* ---------- ---------- ---------- */ 63 | ] 64 | 65 | /* ---------- ---------- ---------- */ 66 | 67 | return _; 68 | })(); 69 | -------------------------------------------------------------------------------- /src/js/cms_model/PageTypeList.js: -------------------------------------------------------------------------------- 1 | 2 | var PageTypeList = {} 3 | 4 | window.PageTypeList = PageTypeList; 5 | 6 | 7 | //ナビゲーション編集の追加ナビ 8 | PageTypeList.tree = (function(){ 9 | var _ = new PageModel.Object_(); 10 | 11 | /* ---------- ---------- ---------- */ 12 | 13 | _.pageInfo = new PageModel.Object_Info({ 14 | id : "object.btnList", 15 | name : "ボタンリスト", 16 | name2 : "<UL><LI><A>", 17 | inputs : ["CLASS","CSS","DETAIL"], 18 | // cssDef : {file:"block",key:"[ボタンリストブロック]"} 19 | cssDef : {selector:".cms-btns"} 20 | }); 21 | 22 | /* ---------- ---------- ---------- */ 23 | 24 | _.grids = [ 25 | /* ---------- ---------- ---------- */ 26 | new PageModel.Object_Grid({ 27 | gridType:Dic.GridType.BASE, 28 | gridInfo:new PageModel.OG_info({ 29 | id : "list", 30 | name : "先頭に追加", 31 | note : "" 32 | }), 33 | textData:null, 34 | gridData:{ 35 | info:new PageModel.OG_SubInfo({ name:"" }), 36 | cells:[ 37 | new PageModel.OG_Cell({ 38 | id: "text", 39 | name: "ラベル名", 40 | type: CELL_TYPE.SINGLE, 41 | def: "ラベル名" 42 | }), 43 | new PageModel.OG_Cell({ 44 | id: "anchor", 45 | name: "リンク", 46 | type: CELL_TYPE.ANCHOR, 47 | def: CMS_AnchorU.getInitData() 48 | }) 49 | ] 50 | } 51 | }), 52 | /* ---------- ---------- ---------- */ 53 | new PageModel.Object_Grid({ 54 | gridType:Dic.GridType.BASE, 55 | gridInfo:new PageModel.OG_info({ 56 | id : "list2", 57 | name : "最後に追加", 58 | note : "" 59 | }), 60 | textData:null, 61 | gridData:{ 62 | info:new PageModel.OG_SubInfo({ name:"" }), 63 | cells:[ 64 | new PageModel.OG_Cell({ 65 | id: "text", 66 | name: "ラベル名", 67 | type: CELL_TYPE.SINGLE, 68 | def: "ラベル名" 69 | }), 70 | new PageModel.OG_Cell({ 71 | id: "anchor", 72 | name: "リンク", 73 | type: CELL_TYPE.ANCHOR, 74 | def: CMS_AnchorU.getInitData() 75 | }) 76 | ] 77 | } 78 | }) 79 | ] 80 | 81 | return _; 82 | })(); 83 | -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_AssetDB.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_AssetDB = (function(){ 3 | 4 | var pages = []; 5 | 6 | //ページ追加 7 | function addPage(_pageModel){ 8 | if(hasPages(_pageModel) == false){ 9 | pages.push(_pageModel); 10 | } 11 | } 12 | //ページにDBに存在するか 13 | function hasPages (_pageModel){ 14 | for (var i = 0; i < pages.length ; i++) { 15 | if(pages[i].id == _pageModel.id) { 16 | if(pages[i].dir == _pageModel.dir) { 17 | return true; 18 | } 19 | } 20 | } 21 | return false; 22 | } 23 | 24 | function setCurrent(_page){ 25 | addPage(_page.pageModel); 26 | currentPage = _page; 27 | } 28 | var currentPage; 29 | 30 | //現在のページを取得 31 | function getCurrentPage() { return currentPage; } 32 | 33 | function hasCurrent() { 34 | if(currentPage == undefined) return false; 35 | return true; 36 | } 37 | 38 | function getID(_id,_dir){ 39 | if(_dir == undefined) _dir = ""; 40 | if(_id == undefined) _id = ""; 41 | if(typeof _dir == "number") _dir = String(_dir); 42 | if(typeof _id == "number") _id = String(_id); 43 | var dir = _dir.split("/").join("__SP__") 44 | var dir = dir.split(".").join("") 45 | var id = _id.split(".").join("") 46 | 47 | return dir + "_" + id; 48 | } 49 | 50 | /* ---------- ---------- ---------- */ 51 | 52 | return { 53 | addPage : addPage, 54 | hasPages : hasPages, 55 | setCurrent : setCurrent, 56 | getCurrentPage : getCurrentPage, 57 | hasCurrent : hasCurrent, 58 | getID : getID 59 | } 60 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_AssetStageResizeView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_AssetStageResizeView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | /* ---------- ---------- ---------- */ 7 | //初期化 8 | 9 | function init(){ 10 | view = $('#CMS_AssetStageResizeView'); 11 | view.hide(); 12 | 13 | var tag = "" 14 | tag += '
' 15 | tag += '
' 16 | view.html(tag); 17 | 18 | view.draggable({ axis: "y" }); 19 | view.on( "drag", function( event, ui ) { 20 | resizeH(ui.position.top); 21 | }); 22 | CMS_AssetStage.registResize(function(){ 23 | view.css("top", CMS_StatusH - CMS_AssetStage.getH()); 24 | }) 25 | } 26 | 27 | var tID_resizeW; 28 | function resizeWindow(){ 29 | if(tID_resizeW) clearTimeout(tID_resizeW); 30 | tID_resizeW = setTimeout(function(){ 31 | view.css("top", CMS_StatusH - CMS_AssetStage.getH()); 32 | },100); 33 | } 34 | 35 | var tID_resizeH; 36 | function resizeH(_y){ 37 | if(tID_resizeH) clearTimeout(tID_resizeH); 38 | tID_resizeH = setTimeout(function(){ 39 | CMS_StageController.offsetY(_y); 40 | },33); 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | //表示・非表示処理 45 | 46 | var isOpen = false; 47 | var isFirst = true; 48 | function stageInit(){ 49 | view.hide(); 50 | } 51 | function stageIn(){ 52 | if(! isOpen){ isOpen = true; 53 | view.show(); 54 | if(isFirst){} 55 | isFirst = false; 56 | resizeWindow(); 57 | } 58 | } 59 | function stageOut(){ 60 | if(isOpen){ isOpen = false; 61 | view.hide(); 62 | } 63 | } 64 | 65 | return { 66 | init: init, 67 | stageIn: stageIn, 68 | stageOut: stageOut 69 | } 70 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FileDetailView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FileDetailView = (function(){ 3 | 4 | var view; 5 | var v = {}; 6 | 7 | function init(){ 8 | view = $('#CMS_Asset_FileDetailView'); 9 | view.append($('
')); 10 | view.append($('
')); 11 | 12 | CMS_Asset_FileEditorView.init(); 13 | CMS_Asset_FilePreviewView.init(); 14 | 15 | } 16 | /* ---------- ---------- ---------- */ 17 | 18 | function save (){ 19 | CMS_Asset_FileEditorView.save(); 20 | } 21 | 22 | /* ---------- ---------- ---------- */ 23 | 24 | var _ps = []; 25 | var _current; 26 | function openPage (_param){ 27 | var ex = CMS_AssetFileU.getExtention(_param.id); 28 | var isClickable = CMS_AssetFileU.isExtentionAll(ex); 29 | var isEdtable = CMS_AssetFileU.isExtention(ex,"editable"); 30 | 31 | if(isEdtable){ 32 | CMS_Asset_FileEditorView.stageIn(_param); 33 | CMS_Asset_FilePreviewView.stageOut(); 34 | } else { 35 | CMS_Asset_FileEditorView.stageOut(); 36 | CMS_Asset_FilePreviewView.stageIn(_param); 37 | } 38 | CMS_AssetStage.openedDetailPage(_param); 39 | } 40 | 41 | /* ---------- ---------- ---------- */ 42 | 43 | var isOpen = false; 44 | var isFirst = true; 45 | function stageInit(){ 46 | view.hide(); 47 | } 48 | function stageIn(_param){ 49 | // if(! isOpen){ isOpen = true; 50 | view.show(); 51 | if(_param) openPage(_param); 52 | // } 53 | } 54 | function stageOut(){ 55 | // if(isOpen){ isOpen = false; 56 | view.hide(); 57 | // } 58 | } 59 | return { 60 | init: init, 61 | stageIn: stageIn, 62 | stageOut: stageOut, 63 | save: save 64 | } 65 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FileEditorClass.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FileEditorClass = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_view,_pageModel) { 5 | this.init(_view,_pageModel); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.init = function(_view,_pageModel) { 11 | var self = this; 12 | this.parentView = _view; 13 | this.pageModel = _pageModel; 14 | this.id = this.pageModel.id; 15 | this.dir = this.pageModel.dir; 16 | 17 | this.storageClass = new Storage.SimpleIO( this.id , this.dir ); 18 | this.storageClass.load(function() { 19 | self.loadData(); 20 | }); 21 | } 22 | 23 | p.loadData = function() { 24 | var self = this; 25 | var dir = this.pageModel.dir; 26 | var id = this.pageModel.id; 27 | 28 | this.pageView = new EditableView.TextPageView ( 29 | this.pageModel, 30 | this.storageClass, 31 | this.parentView, 32 | CMS_AssetStage 33 | ); 34 | this.stageIn(this.pageModel.extra); 35 | } 36 | 37 | /* ---------- ---------- ---------- */ 38 | //そのままリレー 39 | 40 | p.saveData =function () { if(this.pageView) this.pageView.saveData() } 41 | 42 | /* ---------- ---------- ---------- */ 43 | 44 | p.stageInit = function() {} 45 | 46 | p.stageIn = function(_extra) { 47 | if(this.pageView){ 48 | this.pageView.stageIn(_extra); 49 | CMS_AssetDB.setCurrent(this); 50 | } 51 | } 52 | p.stageOut = function() { 53 | if(this.pageView){ 54 | this.pageView.stageOut(); 55 | } 56 | } 57 | p.remove = function() { 58 | if(this.pageView){ 59 | this.isShow = false; 60 | this.pageView.remove(); 61 | } 62 | } 63 | return c; 64 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FileEditorView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FileEditorView = (function(){ 3 | 4 | var view; 5 | var v = {}; 6 | 7 | function init(){ 8 | view = $('#CMS_Asset_FileEditorView'); 9 | } 10 | 11 | /* ---------- ---------- ---------- */ 12 | 13 | function _getID (_id,_dir){ return CMS_AssetDB.getID(_id,_dir) } 14 | function _has (){ return CMS_AssetDB.hasCurrent(); } 15 | function _getCurrent (){ return CMS_AssetDB.getCurrentPage(); } 16 | 17 | function _has_ps (_id,_dir){ 18 | for (var i = 0; i < _ps.length ; i++) { 19 | var id1 = _getID(_id,_dir); 20 | var id2 = _getID(_ps[i].id,_ps[i].dir); 21 | if(id1 == id2)return true; 22 | } 23 | return false; 24 | } 25 | 26 | /* ---------- ---------- ---------- */ 27 | 28 | function save (){ 29 | if(isOpen){ 30 | if(_has()) _getCurrent().saveData(); 31 | } 32 | } 33 | 34 | /* ---------- ---------- ---------- */ 35 | 36 | var _ps = []; 37 | var _current; 38 | 39 | function openPage (_param){ 40 | if(_param == undefined) { 41 | if(_current == undefined)return; 42 | _param = _current; 43 | } 44 | 45 | //ページ作成 46 | if(_has_ps(_param.id,_param.dir) == false){ 47 | _ps.push(new CMS_Asset_FileEditorClass( view , _param)); 48 | } 49 | _current = _param; 50 | 51 | //前のページは非表示にして、現在のページを表示 52 | if(_has()) _getCurrent().stageOut(); 53 | for (var i = 0; i < _ps.length ; i++) { 54 | var id1 = _getID(_param.id,_param.dir) 55 | var id2 = _getID(_ps[i].id,_ps[i].dir) 56 | if(id1 == id2) _ps[i].stageIn(_param.extra);//extra 57 | } 58 | 59 | } 60 | 61 | /* ---------- ---------- ---------- */ 62 | 63 | var isOpen = false; 64 | var isFirst = true; 65 | function stageInit(){ 66 | view.hide(); 67 | } 68 | function stageIn(_param){ 69 | // if(! isOpen){ 70 | isOpen = true; 71 | view.show(); 72 | openPage(_param); 73 | // } 74 | } 75 | function stageOut(){ 76 | // if(isOpen){ 77 | isOpen = false; 78 | view.hide(); 79 | // } 80 | } 81 | /* ---------- ---------- ---------- */ 82 | 83 | function getH(){ 84 | return view.height(); 85 | } 86 | 87 | return { 88 | init: init, 89 | stageIn: stageIn, 90 | stageOut: stageOut, 91 | save: save, 92 | getH: getH 93 | } 94 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FileListState.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FileListState = (function(){ 3 | // var listType = "thumb"; 4 | var listType = "normal"; 5 | function setListType(_s){ 6 | _s = _s || "normal" 7 | listType = _s; 8 | } 9 | function getListType(){ 10 | return listType 11 | } 12 | 13 | var size = "M"; 14 | function setSize(_s){ 15 | size = _s 16 | } 17 | function getSize(){ 18 | return size 19 | } 20 | 21 | return { 22 | setListType: setListType, 23 | getListType: getListType, 24 | setSize: setSize, 25 | getSize: getSize 26 | } 27 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FileListU.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FileListU = (function(){ 3 | 4 | function getUpdateTime(_time){ 5 | return "ファイルリスト更新時間:
"+ DateUtil.getFormattedDate(_time,"YYYY/MM/DD hh:mm:ss"); 6 | } 7 | // 8 | function getImagePreviewTag(_size){ 9 | var s = "" 10 | if(_size > (FILEMANAGER_PREVIEW_LIMIT_MB * 1000 * 1000)){ 11 | s += '

'; 12 | s += FILEMANAGER_PREVIEW_LIMIT_MB; 13 | s += 'MB〜
'; 14 | } else{ 15 | s += '
'; 16 | } 17 | return s 18 | } 19 | 20 | return { 21 | getUpdateTime: getUpdateTime, 22 | getImagePreviewTag: getImagePreviewTag 23 | } 24 | })(); 25 | 26 | 27 | 28 | window.registAssetFloatView = function(_callback){ 29 | var vs = [ 30 | "#CMS_Asset_DirArea", 31 | "#CMS_Asset_FileListView", 32 | "#CMS_Asset_FileDetailView" 33 | ] 34 | $(vs.join(",")).on("mousedown",function(){ 35 | _callback(); 36 | }) 37 | } -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FilePreviewView.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FilePreviewView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | /* ---------- ---------- ---------- */ 7 | //初期化 8 | 9 | function init(){ 10 | view = $('#CMS_Asset_FilePreviewView'); 11 | createlayout(); 12 | } 13 | 14 | function createlayout(){ 15 | var tag = "" 16 | tag += '
' 17 | tag += '
' 18 | tag += '
' 19 | tag += '
' 20 | tag += '
' 21 | tag += '
' 22 | tag += '
'; 23 | view.html(tag); 24 | 25 | v.header = view.find("._header"); 26 | v.title = view.find("._header ._title"); 27 | v.body = view.find("._body"); 28 | } 29 | 30 | function openPage(_param){ 31 | 32 | var _t = CMS_Path.ASSET.getAbsPath_deco_file(_param.id , _param.dir); 33 | v.title.html('
' + _t +'
'); 34 | 35 | var path = _param.dir + _param.id; 36 | var tag = ""; 37 | var b = false; 38 | var ex = CMS_AssetFileU.getExtention(_param.id); 39 | if(CMS_AssetFileU.isExtention(ex,"img")){ 40 | b = true; 41 | tag += '
'; 42 | } 43 | if(CMS_AssetFileU.isExtention(ex,"mov")){ 44 | b = true; 45 | tag += '
'; 46 | } 47 | if(CMS_AssetFileU.isExtention(ex,"pdf")){ 48 | b = true; 49 | tag += ''; 50 | } 51 | if(b){ 52 | tag = tag.split("{URL}").join(path); 53 | } else{ 54 | tag += '
このファイルは、プレビューできません
'; 55 | } 56 | 57 | v.body.html(tag); 58 | } 59 | 60 | /* ---------- ---------- ---------- */ 61 | 62 | var isOpen = false; 63 | var isFirst = true; 64 | function stageInit(){ 65 | view.hide(); 66 | } 67 | function stageIn(_param){ 68 | // if(! isOpen){ 69 | isOpen = true; 70 | view.show(); 71 | openPage(_param); 72 | // } 73 | } 74 | function stageOut(){ 75 | // if(isOpen){ 76 | isOpen = false; 77 | view.hide(); 78 | // } 79 | } 80 | 81 | return { 82 | init: init, 83 | stageIn: stageIn, 84 | stageOut: stageOut, 85 | } 86 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_asset/CMS_Asset_FilesArea.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_Asset_FilesArea = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | /* ---------- ---------- ---------- */ 7 | //初期化 8 | 9 | function init(){ 10 | view = $('#CMS_Asset_FilesArea'); 11 | 12 | stageInit(); 13 | createlayout(); 14 | setBtn(); 15 | } 16 | 17 | /* ---------- ---------- ---------- */ 18 | //レイアウト作成・イベントアサイン 19 | 20 | function createlayout(){ 21 | var tag = ""; 22 | tag += '
'; 23 | tag += '
'; 24 | 25 | tag += '
'; 26 | tag += '
'; 27 | tag += '
'; 28 | view.html(tag); 29 | 30 | CMS_Asset_FileListView.init(); 31 | CMS_Asset_FileDetailView.init(); 32 | 33 | CMS_Asset_UploaderView.init(); 34 | CMS_Asset_CreateFileView.init(); 35 | CMS_Asset_RenameFileView.init(); 36 | } 37 | 38 | function setBtn(){ 39 | } 40 | 41 | 42 | /* ---------- ---------- ---------- */ 43 | //個別処理 44 | 45 | function openPath(_param){ 46 | CMS_Asset_FileListView.openPath(_param); 47 | } 48 | 49 | /* ---------- ---------- ---------- */ 50 | //表示・非表示処理 51 | 52 | var isOpen = false; 53 | var isFirst = true; 54 | function stageInit(){ 55 | view.hide(); 56 | } 57 | function stageIn(){ 58 | if(! isOpen){ isOpen = true; 59 | view.show(); 60 | if(isFirst){ 61 | CMS_Asset_FileListView.stageIn(); 62 | } 63 | isFirst = false; 64 | } 65 | } 66 | function stageOut(){ 67 | if(isOpen){ isOpen = false; 68 | view.hide(); 69 | } 70 | } 71 | 72 | return { 73 | init: init, 74 | openPath: openPath, 75 | stageIn: stageIn, 76 | stageOut: stageOut 77 | } 78 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageClass.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_PageClass = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_view,_pageModel) { 5 | this.init(_view,_pageModel); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.init = function(_view,_pageModel) { 11 | this.parentView = _view; 12 | this.pageModel = _pageModel; 13 | this.id = this.pageModel.id; 14 | this.dir = this.pageModel.dir; 15 | this.type = this.pageModel.type; 16 | 17 | var this_ = this; 18 | // this.storageClass = new Storage.Online(Dic.PageType.PAGE, this.id, this.dir, {}); 19 | this.storageClass = new Storage.Online(this.type, this.id, this.dir, {}); 20 | this.storageClass.load(function() { 21 | this_.loadData(); 22 | }); 23 | } 24 | 25 | p.loadData = function() { 26 | CMS_MainController.openedPage(this); 27 | this.pageView = new EditableView.PageView (this.pageModel,this.storageClass,this.parentView); 28 | this.pageView.stageIn(); 29 | CMS_MainController.openedPage2(this); 30 | } 31 | 32 | /* ---------- ---------- ---------- */ 33 | //そのままリレー 34 | 35 | p.previewData =function (_callback) { if(this.pageView) this.pageView.previewData(_callback) } 36 | p.historyBack =function () { if(this.pageView) this.pageView.historyBack() } 37 | p.saveData =function () { if(this.pageView) this.pageView.saveData() } 38 | p.publishData =function () { if(this.pageView) this.pageView.publishData() } 39 | p.editMeta =function () { if(this.pageView) this.pageView.editMeta() } 40 | p.openURL =function () { if(this.pageView) this.pageView.openURL() } 41 | 42 | /* ---------- ---------- ---------- */ 43 | 44 | p.stageInit = function() {} 45 | 46 | p.stageIn = function() { 47 | if(this.pageView){ 48 | this.pageView.stageIn(); 49 | CMS_MainController.openedPage(this); 50 | CMS_MainController.openedPage2(this); 51 | } 52 | } 53 | p.stageOut = function() { 54 | if(this.pageView){ 55 | this.pageView.stageOut(); 56 | } 57 | } 58 | p.remove = function() { 59 | if(this.pageView){ 60 | this.isShow = false; 61 | this.pageView.remove(); 62 | } 63 | } 64 | return c; 65 | })(); 66 | -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageID.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_PageID = (function(){ 3 | function getID(_id,_dir){ 4 | if(_dir == undefined) _dir = ""; 5 | if(_id == undefined) _id = ""; 6 | var dir = _dir.split("/").join("__SP__") 7 | var id = _id.split(".").join("") 8 | return CMS_PageID.PAGE_PREFIX + dir + "_" + id; 9 | } 10 | function getID_s(_id,_dir){ 11 | if(_dir == undefined) _dir = ""; 12 | if(_id == undefined) _id = ""; 13 | var dir = _dir.split("/").join("__SP__") 14 | var id = _id.split(".").join("") 15 | 16 | return dir + "_" + id; 17 | } 18 | function getID_s2(_id){ 19 | if(_id == undefined) _id = ""; 20 | var _id = _id.split("/").join("__SP__") 21 | _id = _id.split(".").join("") 22 | return _id; 23 | } 24 | return { 25 | getID: getID, 26 | getID_s: getID_s, 27 | getID_s2: getID_s2 28 | } 29 | })(); 30 | 31 | CMS_PageID.PAGE_PREFIX = "_SVP_"; 32 | -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageList_ListDB.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var CMS_PageList_ListEditNo = 0; 4 | 5 | var CMS_PageList_ListDB = (function(){ 6 | var list =[] 7 | function add_(a){ 8 | list.push(a) 9 | } 10 | 11 | function closeAll(){ 12 | for (var i = 0; i < list.length ; i++) { 13 | list[i].trigger("_closeAll"); 14 | } 15 | CMS_PageListViewTree.saveDirManager(); 16 | } 17 | function openAll(){ 18 | for (var i = 0; i < list.length ; i++) { 19 | list[i].trigger("_openAll"); 20 | } 21 | CMS_PageListViewTree.saveDirManager(); 22 | } 23 | 24 | return { 25 | add_: add_, 26 | closeAll: closeAll, 27 | openAll: openAll 28 | } 29 | })(); 30 | -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageList_PageDB.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_PageList_PageDB = (function(){ 3 | 4 | var list = []; 5 | 6 | function _trace(){ 7 | return list; 8 | } 9 | function add_(_page){ 10 | var a = [] 11 | for (var i = 0; i < list.length ; i++) { 12 | if(list[i].isRemoved == false){ 13 | a.push(list[i]) 14 | } 15 | } 16 | list = a; 17 | list.push(_page); 18 | } 19 | 20 | /* ---------- ---------- ---------- */ 21 | 22 | function getPage(_id,_dir){ 23 | for (var i = 0; i < list.length ; i++) { 24 | if(list[i].param.id == _id){ 25 | if(list[i].param.dir == _dir){ 26 | return list[i]; 27 | } 28 | } 29 | } 30 | return null; 31 | } 32 | 33 | /* ---------- ---------- ---------- */ 34 | 35 | var tID; 36 | function updateState(){ 37 | if(tID) clearTimeout(tID); 38 | tID = setTimeout(function(){ 39 | updateState_delay() 40 | },200); 41 | } 42 | function updateState_delay(){ 43 | for (var i = 0; i < list.length ; i++) { 44 | list[i].updateState(); 45 | } 46 | } 47 | 48 | /* ---------- ---------- ---------- */ 49 | 50 | var tID2; 51 | function updateEditState(){ 52 | if(tID2) clearTimeout(tID2); 53 | tID2 = setTimeout(function(){ 54 | updateState_delay() 55 | },200); 56 | } 57 | function updateEditState_delay(){ 58 | for (var i = 0; i < list.length ; i++) { 59 | list[i].updateEditState(); 60 | } 61 | } 62 | return { 63 | _trace: _trace, 64 | add_: add_, 65 | getPage: getPage, 66 | updateState: updateState, 67 | updateEditState: updateEditState 68 | } 69 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageList_StateManager.js: -------------------------------------------------------------------------------- 1 | 2 | //ページ編集ステートを管理する。サイトマップのDate更新用 3 | var CMS_PageList_StateManager = (function() { 4 | 5 | var list = [] 6 | function hasData(_id,_dir) { 7 | _dir = _dir || ""; 8 | for (var i = 0; i < list.length; i++) { 9 | if (_id == list[i][0]) { 10 | if (_dir == list[i][1]) { 11 | return true; 12 | } 13 | } 14 | } 15 | return false; 16 | } 17 | 18 | /* ---------- ---------- ---------- */ 19 | 20 | function isEdited(_id,_dir){ 21 | var b = hasData(_id,_dir); 22 | // console.log([b,_id,_dir]); 23 | return b; 24 | } 25 | /* ---------- ---------- ---------- */ 26 | 27 | function openedPage(_page){ 28 | // 29 | } 30 | 31 | var lastEeditID; 32 | var lastEeditDIR; 33 | 34 | function editedPage(_id,_dir){ 35 | _dir = _dir || ""; 36 | if (hasData(_id,_dir) == false) { 37 | list.push([_id,_dir]); 38 | } 39 | 40 | var b = true 41 | if(lastEeditID == _id){ 42 | if(lastEeditDIR == _dir){ 43 | b = false; 44 | } 45 | } 46 | if(b)CMS_PageList_PageDB.updateEditState(); 47 | lastEeditID = _id; 48 | lastEeditDIR = _dir; 49 | } 50 | function savedPage(_id,_dir){ 51 | _dir = _dir || ""; 52 | var a = [] 53 | for (var i = 0; i < list.length; i++) { 54 | var b = true; 55 | if (_id == list[i][0]) { 56 | if (_dir == list[i][1]) { 57 | b = false; 58 | } 59 | } 60 | if(b)a.push(list[i]); 61 | } 62 | list = a; 63 | CMS_PageList_PageDB.updateEditState(); 64 | lastEeditID = false; 65 | lastEeditDIR = false; 66 | } 67 | 68 | function publishedPage(_id,_dir){ 69 | _dir = _dir || ""; 70 | CMS_PageList_PageDB.updateEditState(); 71 | } 72 | 73 | function unPublishedPage(_id,_dir){ 74 | _dir = _dir || ""; 75 | CMS_PageList_PageDB.updateEditState(); 76 | } 77 | 78 | /* ---------- ---------- ---------- */ 79 | 80 | return { 81 | openedPage:openedPage, 82 | editedPage:editedPage, 83 | savedPage:savedPage, 84 | publishedPage:publishedPage, 85 | unPublishedPage:unPublishedPage, 86 | isEdited:isEdited 87 | } 88 | })(); -------------------------------------------------------------------------------- /src/js/cms_stage_page/CMS_PageStage.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_PageStage = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | /* ---------- ---------- ---------- */ 7 | //初期化 8 | 9 | function init(){ 10 | view = $('#CMS_PageStage'); 11 | // stageInit(); 12 | createlayout(); 13 | setBtn(); 14 | } 15 | 16 | /* ---------- ---------- ---------- */ 17 | //レイアウト作成・イベントアサイン 18 | 19 | function createlayout(){ 20 | var tag = "" 21 | tag += '
'; 22 | tag += '
'; 23 | tag += '
'; 24 | tag += '
'; 25 | tag += '
'; 26 | view.append(tag); 27 | 28 | CMS_PageListView.init(); 29 | CMS_PageListBgView.init(); 30 | CMS_PagesView.init(); 31 | CMS_IntroView.init(); 32 | AddElements.init(); 33 | } 34 | 35 | function setBtn(){ 36 | view.on("mousedown",function(){ 37 | CMS_KeyManager.setType(""); 38 | }) 39 | 40 | } 41 | 42 | /* ---------- ---------- ---------- */ 43 | //個別処理 44 | 45 | 46 | 47 | /* ---------- ---------- ---------- */ 48 | //表示・非表示処理 49 | 50 | var isOpen = false; 51 | var isFirst = true; 52 | function stageInit(){ 53 | view.hide(); 54 | } 55 | function stageIn(){ 56 | if(! isOpen){ isOpen = true; 57 | view.show(); 58 | if(isFirst){ 59 | CMS_PageListView.stageIn(); 60 | } 61 | isFirst = false; 62 | } 63 | } 64 | function stageOut(){ 65 | if(isOpen){ isOpen = false; 66 | view.hide(); 67 | } 68 | } 69 | 70 | return { init:init, stageIn:stageIn, stageOut:stageOut } 71 | })(); 72 | -------------------------------------------------------------------------------- /src/js/cms_stage_setting/CMS_SettingsView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_stage_setting/CMS_SettingsView.js -------------------------------------------------------------------------------- /src/js/cms_stage_setting/CMS_SettingsView.p2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_stage_setting/CMS_SettingsView.p2.js -------------------------------------------------------------------------------- /src/js/cms_stage_setting/CMS_SettingsView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_stage_setting/CMS_SettingsView.p3.js -------------------------------------------------------------------------------- /src/js/cms_stage_setting/CMS_SettingsView.p4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_stage_setting/CMS_SettingsView.p4.js -------------------------------------------------------------------------------- /src/js/cms_stage_setting/CMS_SettingsView.p5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_stage_setting/CMS_SettingsView.p5.js -------------------------------------------------------------------------------- /src/js/cms_stage_sidepreview/CMS_SidePreviewClose.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_SidePreviewClose = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#CMS_SidePreviewClose'); 8 | //stageInit(); 9 | createlayout(); 10 | setBtn(); 11 | } 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | function createlayout(){ 16 | var tag = '' 17 | tag += '
'; 18 | tag += '
'; 19 | tag += '
'; 20 | // tag += '
'; 21 | // tag += '
+
'; 22 | // tag += '
-
'; 23 | 24 | view.append(tag); 25 | v.btn_open = view.find('._btn_open'); 26 | v.btn_open.click(function() { 27 | CMS_StageController.openPreviewStage(true); 28 | }); 29 | } 30 | 31 | function setBtn(){ 32 | } 33 | 34 | /* ---------- ---------- ---------- */ 35 | 36 | var isOpen = false; 37 | var isFirst = true; 38 | function stageInit(){ 39 | view.hide(); 40 | } 41 | function stageIn(){ 42 | if(! isOpen){ isOpen = true; 43 | view.show(); 44 | if(isFirst){} 45 | isFirst = false; 46 | } 47 | } 48 | function stageOut(){ 49 | if(isOpen){ isOpen = false; 50 | view.hide(); 51 | } 52 | } 53 | 54 | return { init:init, stageIn:stageIn, stageOut:stageOut } 55 | })(); 56 | -------------------------------------------------------------------------------- /src/js/cms_storage/Storage.Local.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ページツリーの開閉リストの記憶などで仕様 3 | */ 4 | 5 | Storage.Local = (function() { 6 | /* ---------- ---------- ---------- */ 7 | var c = function(_id,_initData) { 8 | this.init(_id,_initData); 9 | } 10 | var p = c.prototype; 11 | /* ---------- ---------- ---------- */ 12 | 13 | p.init = function(_id,_initData) { 14 | this.id = _id; 15 | this.initData = _initData; 16 | this.storeData = {}; 17 | this.callback; 18 | this.callbackSave; 19 | } 20 | 21 | p.load = function(_callback) { 22 | this.callback = _callback; 23 | var s; 24 | if(!localStorage.hasOwnProperty(this.id)){ 25 | s = JSON.stringify(this.initData); 26 | localStorage[this.id] = s; 27 | } else{ 28 | s = localStorage[this.id]; 29 | } 30 | this.storeData = JSON.parse(s); 31 | this.save(function(){}); 32 | this.loaded(); 33 | } 34 | p.loaded = function(){ 35 | this.callback(); 36 | } 37 | p.setData = function(_data){ 38 | this.storeData = _data; 39 | } 40 | p.save = function (_callback){ 41 | this.callbackSave = _callback; 42 | localStorage[this.id] = JSON.stringify(this.storeData); 43 | } 44 | p.saved = function (data){ 45 | this.callbackSave(); 46 | } 47 | p.getData = function (){ 48 | return this.storeData; 49 | } 50 | p.reset = function (){ 51 | delete localStorage[this.id]; 52 | } 53 | p.exportJSON = function (){ 54 | return JSON.stringify(this.storeData, null, " "); 55 | } 56 | p.importJSON = function (_s){ 57 | try{ 58 | this.storeData = JSON.parse(_s); 59 | this.save(function(){}); 60 | }catch( e ){ 61 | alert("入力データが正しくありません。"); 62 | } 63 | } 64 | return c; 65 | })(); 66 | 67 | -------------------------------------------------------------------------------- /src/js/cms_storage/Storage.SimpleIO.js: -------------------------------------------------------------------------------- 1 | /** 2 | * TemplateFileEdi..で使用するIOクラス 3 | */ 4 | 5 | Storage.SimpleIO = (function(_filename,_dir) { 6 | 7 | /* ---------- ---------- ---------- */ 8 | var c = function(_filename,_dir) { 9 | this.init(_filename,_dir); 10 | } 11 | var p = c.prototype; 12 | /* ---------- ---------- ---------- */ 13 | 14 | p.filename; 15 | p.text; 16 | 17 | p.init = function(_filename,_dir) { 18 | this.dir = _dir; 19 | // if(this.dir.indexOf("/") == -1) this.dir = this.dir+ "/"; 20 | this.filename = _filename; 21 | this.text = ""; 22 | } 23 | p.reload = function(_callback) { 24 | this.load(_callback); 25 | } 26 | p.load = function(_callback) { 27 | var this_ = this; 28 | var path = this.dir+"/"+ this.filename; 29 | var url = CMS_Path.PHP_FILEPATH + '?action=read&path=' + path; 30 | $.ajax({ 31 | scriptCharset : 'utf-8', 32 | type : 'GET', 33 | url : url, 34 | dataType : 'text', 35 | success : function(data) {this_.text = data;_callback(data)}, 36 | error : function(data) { 37 | CMS_ErrorView.stageIn("NET",url,null,data); 38 | // alert("ファイルのロードに失敗しました。"); 39 | } 40 | }); 41 | if(isLog)console.log( ["Storage.SimpleIO.load ", path]); 42 | } 43 | p.preview = function(_callback) { } 44 | p.save = function(_t,_callback) { 45 | 46 | var param ={} 47 | param.action = "write"; 48 | param.dir_name = this.dir; 49 | param.file_name = this.filename; 50 | param.text = _t; 51 | var url = CMS_Path.PHP_FILEPATH; 52 | $.ajax({ 53 | scriptCharset : 'utf-8', 54 | type : 'POST', 55 | url : url, 56 | data : Storage.Util.escape_(param), 57 | dataType : 'json', 58 | success : function(data) { 59 | if(API_StatusCheck.check(data) == false) return; 60 | _callback(data) 61 | }, 62 | error : function(data) { 63 | CMS_ErrorView.stageIn("NET",url,param,data); 64 | } 65 | }); 66 | if(isLog)console.log( ["Storage.SimpleIO.save ", param.file_name , param]); 67 | } 68 | return c; 69 | })(); 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/js/cms_storage/Storage.StatusCheck.js: -------------------------------------------------------------------------------- 1 | 2 | var API_StatusCheck = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function openAlert(_s){ 7 | if(CMS_AlertView){ 8 | CMS_AlertView.stageIn("エラー",_s); 9 | } else{ 10 | alert(_s); 11 | } 12 | } 13 | 14 | function check(data){ 15 | if(data["status"] != undefined){ 16 | if(data.status == -1) { 17 | openAlert("ログインしていません。再度、ログインしてください。"); 18 | window.location.reload(); 19 | return false; 20 | } 21 | if(data.status == 0){ 22 | var b = true 23 | if(data["level"] != undefined){ 24 | if(data.level == "0") b = false; 25 | } 26 | if(b){ 27 | var mm = data.message 28 | if(data.message == CMS_E.DIR_ERROR) { 29 | mm = ""; 30 | if(data["extra"] != undefined) mm += data.extra 31 | mm += "ディレクトリが存在しないか、書き込み権限がありません。" 32 | } 33 | openAlert("処理が正常に終了しませんでした。\n"+mm) 34 | return false; 35 | } else{ 36 | return true; 37 | } 38 | } 39 | if(data.status == 1){ 40 | return true; 41 | } 42 | } 43 | return true; 44 | } 45 | 46 | function checkWeak(data){ 47 | if(data["status"] != undefined){ 48 | if(data.status == -1) { 49 | openAlert("ログインしていません。再度、ログインしてください。"); 50 | window.location.reload(); 51 | return false; 52 | } 53 | if(data.status == 0){ 54 | return false; 55 | } 56 | if(data.status == 1){ 57 | return true; 58 | } 59 | } 60 | return true; 61 | } 62 | 63 | /** 64 | * ファイル名のリネームや、削除時のチェック 65 | * ファイルが存在しない場合があるので,0の場合もtrue 66 | */ 67 | /* 68 | function checkRename(data){ 69 | if(data["status"] != undefined){ 70 | if(data.status == -1) { 71 | openAlert("ログインしていません。再度、ログインしてください。"); 72 | window.location.reload(); 73 | return false; 74 | } 75 | if(data.status == 0){ 76 | return true; 77 | } 78 | if(data.status == 1){ 79 | return true; 80 | } 81 | } 82 | return true; 83 | } 84 | */ 85 | 86 | return { 87 | check: check, 88 | checkWeak: checkWeak 89 | }})(); 90 | -------------------------------------------------------------------------------- /src/js/cms_util/AnimU.js: -------------------------------------------------------------------------------- 1 | 2 | var AnimU = (function(){ 3 | 4 | var func_; 5 | function attention(_param){ 6 | var v = _param.v; 7 | var d = (_param.d) ? _param.d/1000:0; 8 | 9 | if(func_)func_.remove(); 10 | func_ = new serial_([ 11 | d , function () { 12 | v.addClass("_current"); 13 | } 14 | ,0.15, function () { 15 | v.removeClass("_current"); 16 | } 17 | ]); 18 | func_.start(); 19 | } 20 | 21 | var serial_ = (function() { 22 | var c = function(_args) { 23 | this.args = _args; 24 | this.currentNo = 0; 25 | this.playingFlg = false; 26 | this.isPause = false; 27 | } 28 | var p = c.prototype; 29 | p.start = function( ) { 30 | if(! this.playingFlg){ 31 | this.playingFlg = true; 32 | this.execute_core(); 33 | } 34 | } 35 | p.execute_core = function ( ) { 36 | if (this.playingFlg) { 37 | if (this.currentNo < this.args.length) { 38 | var command = this.args[this.currentNo]; 39 | if (typeof(command) != "number") { 40 | command(); 41 | this.execute_next(); 42 | }else { 43 | var this_ = this; 44 | setTimeout(function(){ 45 | this_.execute_next() 46 | },command * 1000); 47 | } 48 | } else { 49 | this.funish(); 50 | } 51 | } 52 | } 53 | p.execute_next = function ( ) { 54 | if(this.isPause) return; 55 | if(this.playingFlg){ 56 | this.currentNo++; 57 | this.execute_core(); 58 | } 59 | } 60 | p.funish = function ( ) { 61 | this.playingFlg = false; 62 | this.init(); 63 | } 64 | p.pause = function ( ) { 65 | this.isPause = true; 66 | } 67 | p.restart = function ( ) { 68 | this.isPause = false; 69 | this.execute_next(); 70 | } 71 | p.jump = function ( _n) { 72 | this.currentNo = _n-1; 73 | } 74 | p.init = function ( ) { 75 | this.playingFlg = false; 76 | this.currentNo = 0; 77 | } 78 | p.remove = function ( ) { 79 | this.currentNo = 0; 80 | this.playingFlg = false; 81 | } 82 | return c; 83 | })(); 84 | 85 | return { 86 | attention: attention, 87 | serial_: serial_ 88 | }})(); 89 | -------------------------------------------------------------------------------- /src/js/cms_util/CMS_AnchorListU.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_AnchorListU = (function(){ 3 | 4 | function getViewTag(val,_isPub){ 5 | if(_isPub == undefined) _isPub = true; 6 | var tag = 'リンク未設定'; 7 | if(val == "") return tag; 8 | if(val == undefined) return tag; 9 | if(val["list"] == undefined) return tag; 10 | 11 | var list = CMS_U.getPublicList(val.list.grid); 12 | var tag = ""; 13 | if(list.length == 0) { 14 | tag += 'リストデータを入力...' 15 | } else{ 16 | tag += '\n' 21 | } 22 | return tag; 23 | } 24 | 25 | return { 26 | getViewTag:getViewTag 27 | } 28 | })(); 29 | -------------------------------------------------------------------------------- /src/js/cms_util/CMS_PateStateU.js: -------------------------------------------------------------------------------- 1 | 2 | var CMS_PateStateU = (function(){ 3 | var def = "0,0,0"; 4 | function getState(_s){ 5 | if(_s == undefined) _s = def; 6 | if(_s == "") _s = def; 7 | return _s.split(","); 8 | } 9 | function getPubClass(_s){ 10 | if(_s == undefined) _s = def; 11 | if(_s == "") _s = def; 12 | var ss = _s.split(","); 13 | return (ss[0] != "1") ? "" : '_isHide'; 14 | } 15 | function getStateText(_s){ 16 | if(_s == undefined) _s = def; 17 | if(_s == "") _s = def; 18 | var ss = _s.split(","); 19 | var t = ""; 20 | t +=(ss[0] != "1") ? "" : '(非公開)'; 21 | t += (ss[1] != "1") ? "" : '(メニュ非表示)'; 22 | t += (ss[2] != "1") ? "" : '(工事中)'; 23 | return t; 24 | } 25 | function createState(_a){ 26 | return _a.join(",") 27 | } 28 | 29 | var defCMS = "0,0,0"; 30 | function getCMSClass(_s){ 31 | if(_s == undefined) _s = defCMS; 32 | if(_s == "") _s = defCMS; 33 | var ss = _s.split(","); 34 | var c = "" 35 | c += (ss[0] != "1") ? "" : '_fileEM '; 36 | return c; 37 | } 38 | 39 | return { 40 | getState:getState, 41 | getPubClass:getPubClass, 42 | getStateText:getStateText, 43 | createState:createState, 44 | getCMSClass:getCMSClass 45 | } 46 | })(); -------------------------------------------------------------------------------- /src/js/cms_util/CMS_SaveDateU.js: -------------------------------------------------------------------------------- 1 | var CMS_SaveDateU = (function(){ 2 | function getDate(){ 3 | return DateUtil.getFormattedDate(new Date(),"YYYY/MM/DD hh:mm:ss"); 4 | } 5 | function getRelatedDate(_s,_current){ 6 | if(!_s) return "--"; 7 | if(_s == "-") return "--"; 8 | var d = new Date(_s); 9 | 10 | var c = new Date(); 11 | if(_current != undefined)c = _current; 12 | var sec = (c.getTime()- d.getTime()) / (1000); 13 | var min = sec/60; 14 | var hour = min/60; 15 | var day = hour/24; 16 | var ss = ""; 17 | if(sec < 20){ 18 | ss = '' + Math.floor(sec) +"秒前" + ''; 19 | } else if(sec < 60){ 20 | ss = '' +Math.floor(sec) +"秒前" + '' 21 | } else if(min < 60){ 22 | ss = '' +Math.floor(min) +"分前" + ''; 23 | } else if(hour < 24){ 24 | ss = '' +Math.floor(hour) +"時間前" + ''; 25 | } else if(hour < 24*7){ 26 | ss = '' +Math.floor(day) +"日前" + ''; 27 | } else if(hour < 24*30){ 28 | ss = '' +Math.floor(day) +"日前" + ''; 29 | } else{ 30 | ss = '' +Math.floor(day) +"日前" + ''; 31 | } 32 | return ss; 33 | } 34 | 35 | return { 36 | getDate:getDate, 37 | getRelatedDate:getRelatedDate 38 | } 39 | })(); 40 | -------------------------------------------------------------------------------- /src/js/cms_util/CodeMirrorU.js: -------------------------------------------------------------------------------- 1 | 2 | var CodeMirrorU = (function(){ 3 | // 4 | function getColorType(_ex){ 5 | if(_ex == "js") return "_editor-js"; 6 | if(_ex == "json") return "_editor-js"; 7 | if(_ex == "css") return "_editor-style"; 8 | if(_ex == "class") return "_editor-style"; 9 | if(_ex == "style") return "_editor-style"; 10 | if(_ex == "single-class") return "_editor-style"; 11 | if(_ex == "html") return "_editor-html"; 12 | if(_ex == "htm") return "_editor-html"; 13 | return "_editor-text"; 14 | } 15 | function getMode(_ex){ 16 | if(_ex == "js") return "javascript"; 17 | if(_ex == "style") return "css"; 18 | if(_ex == "css") return "css"; 19 | if(_ex == "class") return "css"; 20 | // if(_ex == "html") return "htmlmixed"; 21 | // if(_ex == "htm") return "htmlmixed"; 22 | // if(_ex == "p") return "htmlmixed"; 23 | if(_ex == "markdown") s = "markdown"; 24 | if(_ex == "php") return "php"; 25 | return "htmlmixed"; 26 | } 27 | 28 | /* ---------- ---------- ---------- */ 29 | 30 | function _getEditor(_textarea,_ex,_wap){ 31 | var e = CodeMirror.fromTextArea(_textarea, { 32 | mode: getMode(_ex), 33 | lineNumbers: true, 34 | lineWrapping: _wap, 35 | foldGutter: true, 36 | gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], 37 | highlightSelectionMatches: {showToken: /\w/}, 38 | autoCloseBrackets: true, 39 | indentWithTabs: true 40 | }); 41 | e.foldCode(CodeMirror.Pos(0,0)); 42 | return e; 43 | } 44 | function createSettingEditor(_textarea,_ex,_wap){ 45 | var e = _getEditor(_textarea,_ex,_wap); 46 | e.setOption("theme", "zenburn"); 47 | return e; 48 | } 49 | function createEditor(_textarea,_ex,_wap){ 50 | var e = _getEditor(_textarea,_ex,_wap); 51 | // var theme = (function(_ex){ 52 | // if(_ex == "js") return "zenburn"; 53 | // if(_ex == "json") return "zenburn"; 54 | // return ""; 55 | // })(_ex); 56 | return e; 57 | 58 | } 59 | return { 60 | getColorType:getColorType, 61 | createSettingEditor:createSettingEditor, 62 | createEditor:createEditor 63 | } 64 | })(); 65 | 66 | -------------------------------------------------------------------------------- /src/js/cms_util/FileU.js: -------------------------------------------------------------------------------- 1 | 2 | var FileU = (function() { 3 | 4 | function formatFilesize(_s) { 5 | var s = ""; 6 | var nn =1000 7 | var sizeKB = _s / nn; 8 | if (parseInt(sizeKB) > nn) { 9 | var sizeMB = sizeKB / nn; 10 | s = "" + sizeMB.toFixed(1) + " MB" ; 11 | } else { 12 | s = sizeKB.toFixed(1) + " KB"; 13 | } 14 | return s; 15 | } 16 | 17 | function getFileName(_s){ 18 | if(_s.indexOf(".") == -1)return _s; 19 | var ss = _s.split(".") 20 | ss.pop() 21 | return ss.join(".") 22 | } 23 | function getExtention(_s){ 24 | if(_s == null) return ""; 25 | var ss = _s.split("."); 26 | if(ss.length == 1)return ""; 27 | var ex = ss[ss.length-1]; 28 | return ex.toLowerCase(); 29 | } 30 | 31 | function isImageFile(_s){ 32 | var ex = getExtention(_s.toLowerCase()); 33 | if(ex == "gif") return true; 34 | if(ex == "jpg") return true; 35 | if(ex == "jpeg") return true; 36 | if(ex == "png") return true; 37 | if(ex == "svg") return true; 38 | return false; 39 | } 40 | // 41 | function isEditableFile(_s){ 42 | var ex = getExtention(_s.toLowerCase()); 43 | if(ex == "html") return true; 44 | if(ex == "htm") return true; 45 | if(ex == "js") return true; 46 | if(ex == "json") return true; 47 | if(ex == "css") return true; 48 | if(ex == "txt") return true; 49 | if(ex == "md") return true; 50 | if(ex == "php") return true; 51 | 52 | if(ex == "shtml") return true; 53 | if(ex == "xhtml") return true; 54 | if(ex == "xml") return true; 55 | if(ex == "rss") return true; 56 | 57 | if(ex == "pl") return true; 58 | if(ex == "asp") return true; 59 | if(ex == "cgi") return true; 60 | if(ex == "log") return true; 61 | return false; 62 | } 63 | function isPreviewableFile(_s){ 64 | var ex = getExtention(_s.toLowerCase()); 65 | if(ex == "html") return true; 66 | if(ex == "htm") return true; 67 | if(ex == "pdf") return true; 68 | if(ex == "txt") return true; 69 | if(ex == "js") return true; 70 | if(ex == "css") return true; 71 | return false; 72 | } 73 | return { 74 | formatFilesize: formatFilesize, 75 | getFileName:getFileName, 76 | getExtention:getExtention, 77 | isImageFile:isImageFile, 78 | isEditableFile:isEditableFile, 79 | isPreviewableFile:isPreviewableFile 80 | } 81 | })(); 82 | -------------------------------------------------------------------------------- /src/js/cms_util/StringU.js: -------------------------------------------------------------------------------- 1 | var StringU = (function(){ 2 | 3 | function z2h(s){ 4 | return s.replace(/[A-Za-z0-9]/g, function(s) { 5 | return String.fromCharCode(s.charCodeAt(0) - 0xFEE0); 6 | }); 7 | } 8 | 9 | function h2z(s){ 10 | return s.replace(/[A-Za-z0-9]/g, function(s) { 11 | return String.fromCharCode(s.charCodeAt(0) + 0xFEE0); 12 | }); 13 | } 14 | 15 | function zen2han(s){ 16 | s = z2h(s) 17 | return s; 18 | } 19 | 20 | function han2zen(s){ 21 | s = h2z(s); 22 | var res = (s.match(/<("[^"]*"|'[^']*'|[^'">])*>/g)); 23 | 24 | if(res){ 25 | for (var i = 0; i < res.length ; i++) { 26 | s = s.split(res[i]).join(z2h(res[i])); 27 | } 28 | } 29 | return s; 30 | } 31 | function deleteTag(s){ 32 | return s.replace(/<("[^"]*"|'[^']*'|[^'">])*>/g,'') 33 | } 34 | 35 | return { 36 | zen2han:zen2han, 37 | han2zen:han2zen, 38 | deleteTag:deleteTag 39 | } 40 | })(); 41 | 42 | var NumberU = (function(){ 43 | //NumberU.defaultNumber 44 | function defaultNumber(_n,_def){ 45 | _def = ( isNaN(_def) ) ? 0 : _def; 46 | var n = Number(_n); 47 | if(isNaN(n)){ 48 | return _def 49 | } 50 | return n 51 | } 52 | return { 53 | defaultNumber:defaultNumber 54 | } 55 | })(); 56 | 57 | -------------------------------------------------------------------------------- /src/js/cms_util/TagU.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_util/TagU.js -------------------------------------------------------------------------------- /src/js/cms_util/Treatment.js: -------------------------------------------------------------------------------- 1 | var Treatment = (function() { 2 | function toValue(_n, _s) { 3 | if (_n == undefined) return _s; 4 | if (_n == "") return _s; 5 | return _n; 6 | } 7 | return { 8 | toValue: toValue 9 | } 10 | })(); -------------------------------------------------------------------------------- /src/js/cms_util/cms_base.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_util/cms_base.js -------------------------------------------------------------------------------- /src/js/cms_util/functions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_util/functions.js -------------------------------------------------------------------------------- /src/js/cms_util/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_util/index.js -------------------------------------------------------------------------------- /src/js/cms_util/pi_lib.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_util/pi_lib.js -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.BaseGridState.js: -------------------------------------------------------------------------------- 1 | 2 | EditableView.BaseGridState = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function() { 5 | this.init(); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.init = function() { 11 | } 12 | 13 | p.maxRow = (window["GRID_EDIT_MAX_ROW"]) ? GRID_EDIT_MAX_ROW :50; 14 | 15 | p.currentRow = -1 16 | p.currentPage = 0 17 | p.fitWide = true 18 | p.hideCols = "" 19 | 20 | p.setData = function(_state) { 21 | var o = _state; 22 | if(o == undefined) o = {} 23 | if(o["currentRow"] === undefined ) o.currentRow = -1; 24 | if(o["currentPage"] === undefined ) o.currentPage = 0; 25 | if(o["fitWide"] === undefined ) o.fitWide = true; 26 | if(o["hideCols"] === undefined ) o.hideCols = ""; 27 | this.currentRow = o.currentRow; 28 | this.currentPage = o.currentPage; 29 | this.fitWide = o.fitWide; 30 | this.hideCols = o.hideCols; 31 | } 32 | p.getData = function() { 33 | return { 34 | currentRow: this.currentRow, 35 | currentPage: this.currentPage, 36 | fitWide: this.fitWide, 37 | hideCols: this.hideCols 38 | }; 39 | } 40 | 41 | //setter 42 | p.setCurrentPage = function(_n) { this.currentPage = _n; } 43 | p.setCurrentRow = function(_n) { this.currentRow = _n; } 44 | p.setFitWide = function(_n) { this.fitWide = _n; } 45 | p.setHideCols = function(_n) { this.hideCols = _n; } 46 | 47 | //ページにおける現在の行を取得 48 | p.getRowAtPage = function(_r) { 49 | if(_r === undefined) _r = this.currentRow 50 | var s = this.currentPage * this.maxRow; 51 | var r = (_r - s) + 1; 52 | return r; 53 | } 54 | 55 | //指定行は、現在の表示ページに含まれるか 56 | p.isCurrentPage = function(_r) { 57 | if(_r == undefined) _r = this.currentRow 58 | var s = this.currentPage * this.maxRow; 59 | var e = s + this.maxRow; 60 | if(s <= _r){ 61 | if(e > _r) return true; 62 | } 63 | return false; 64 | } 65 | 66 | //ページ調整 67 | p.adjustPage = function(_pageLeng) { 68 | if (_pageLeng <= this.maxRow * this.currentPage) { 69 | this.currentPage = Math.floor(_pageLeng / this.maxRow) - 1; 70 | } 71 | //-1などになる場合は、0にまるめる 72 | if(this.currentPage < 0) this.currentPage = 0; 73 | } 74 | 75 | return c; 76 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.BaseTextsU.js: -------------------------------------------------------------------------------- 1 | 2 | EditableView.BaseTextsU = (function() { 3 | 4 | function getTextsTag (_gridParam,_list){ 5 | var nodes = []; 6 | for (var i = 0; i < 1 ; i++) { 7 | for (var ii = 0; ii < _gridParam.cells.length ; ii++) { 8 | var cell = _gridParam.cells[ii]; 9 | var val = Treatment.toValue(_list[i][cell.id] ,""); 10 | nodes.push({ 11 | name:cell.name, 12 | node:EditableView.InputFormProvider[cell.type](i,val,cell) 13 | }); 14 | } 15 | } 16 | // 17 | var fragment = document.createDocumentFragment(); 18 | 19 | var table = document.createElement('table'); 20 | table.setAttribute('class', '_layoutTable'); 21 | fragment.appendChild(table); 22 | 23 | for (var i = 0; i < nodes.length; i++) { 24 | var tr = document.createElement('tr'); 25 | var th = document.createElement('th'); 26 | th.setAttribute('class', '_cellTitle'); 27 | th.innerHTML = nodes[i].name; 28 | 29 | var td = document.createElement('td'); 30 | if(nodes[i].node){ 31 | td.appendChild(nodes[i].node) 32 | } 33 | tr.appendChild(th); 34 | tr.appendChild(td); 35 | table.appendChild(tr); 36 | } 37 | return fragment; 38 | } 39 | 40 | //マルチグリッドで使用してる 41 | //カード検索オブジェクトの、検索条件サマリー表示 42 | function getTextsTagSum(_gridParam,_list){ 43 | var tag = '
'; 44 | for (var i = 0; i < _list.length ; i++) { 45 | for (var ii = 0; ii < _gridParam.cells.length ; ii++) { 46 | var cell = _gridParam.cells[ii]; 47 | var val = Treatment.toValue(_list[i][cell.id] ,""); 48 | if(cell.view == "one") tag += val + '
'; 49 | } 50 | } 51 | tag += "
"; 52 | return tag; 53 | } 54 | return { 55 | getTextsTag:getTextsTag, 56 | getTextsTagSum:getTextsTagSum 57 | } 58 | 59 | })(); 60 | -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.DocPageView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_editable/EditableView.DocPageView.js -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.InputU.js: -------------------------------------------------------------------------------- 1 | 2 | EditableView.InputU = (function(){ 3 | 4 | function getNo(_s){ 5 | return Number($(_s).attr("data-no")); 6 | } 7 | 8 | function addData(_type){ 9 | var cellTypes = _type; 10 | var o = {}; 11 | for (var i = 0; i < cellTypes.length ; i++) { 12 | var cell = cellTypes[i]; 13 | var val = ""; 14 | val = cell.def; 15 | if(typeof cell.def == "function") { 16 | val = cell.def() 17 | } 18 | //2017-08-28 19:12:47 19 | if(typeof cell.def == "object") { 20 | val = JSON.parse(JSON.stringify(cell.def)); 21 | } 22 | if(val == ""){ 23 | if(cell.type == CELL_TYPE.SELECT){ 24 | for (var g = 0; g < cell.vals.length ; g++) { 25 | if(cell.vals[g][2] == "1")val = cell.vals[g][0]; 26 | } 27 | } 28 | } 29 | if(val=="DATE_ID"){ 30 | val = DateUtil.getFormattedDate(new Date(),"YYYYMMDD_RRRRR"); 31 | } 32 | o[cell.id] = val; 33 | } 34 | o._state = ["publicData"]; 35 | return o; 36 | } 37 | 38 | function getTenten(_s){ 39 | var s = ""; 40 | if(_s){ 41 | s = "."; 42 | var gg = Math.floor(_s.length/5); 43 | for (var i = 0; i < gg ; i++) { 44 | s += "."; 45 | } 46 | } else{ 47 | s = ""; 48 | } 49 | return s.split(".....").join("..... "); 50 | } 51 | 52 | return { 53 | getNo:getNo, 54 | addData:addData, 55 | getTenten:getTenten 56 | 57 | } 58 | })(); 59 | -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.SettingView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_editable/EditableView.SettingView.js -------------------------------------------------------------------------------- /src/js/cms_view_editable/EditableView.js: -------------------------------------------------------------------------------- 1 | 2 | var EditableView = {} 3 | EditableView.currentGrid = null; 4 | -------------------------------------------------------------------------------- /src/js/cms_view_floats/AddElements.js: -------------------------------------------------------------------------------- 1 | 2 | var AddElements = (function(){ 3 | var view; 4 | var v = {} 5 | function init(){ 6 | view = $('#AddElements'); 7 | var tag = ""; 8 | tag += '
'; 9 | tag += ' '; 10 | tag += ' ブロック追加'; 11 | tag += '
'; 12 | tag += '
'; 13 | tag += ' '; 14 | tag += '
'; 15 | tag += '
'; 16 | tag += '
'; 17 | view.html(tag); 18 | 19 | v.arrow = $('#AddElementsArrow'); 20 | v.arrowClose = $('#AddElementsArrowClose'); 21 | v.arrow.click(function() { show(); }); 22 | v.arrowClose.click(function() { hide(); }); 23 | 24 | update(); 25 | 26 | AddElementsView .init(); 27 | AddElementsBtnSet .init(); 28 | stageInit(); 29 | } 30 | 31 | var prevY = -1; 32 | function update(){ 33 | } 34 | var isShow = false; 35 | function show(){ 36 | $("body").addClass("_showAddPanel"); 37 | } 38 | var tID; 39 | function hide(){ 40 | $("body").removeClass("_showAddPanel"); 41 | } 42 | 43 | /* ---------- ---------- ---------- */ 44 | 45 | var isOpen = false; 46 | var isFirst = true; 47 | function stageInit(){ 48 | view.hide(); 49 | } 50 | function stageIn(){ 51 | if(! isOpen){ isOpen = true; 52 | view.show(); 53 | if(isFirst){} 54 | isFirst = false; 55 | } 56 | } 57 | function stageOut(){ 58 | if(isOpen){ isOpen = false; 59 | view.hide(); 60 | } 61 | } 62 | function setVisible(_b){ 63 | if(_b){ 64 | stageIn() 65 | } else{ 66 | stageOut(); 67 | } 68 | 69 | } 70 | return { 71 | init: init, 72 | stageIn:stageIn, 73 | stageOut:stageOut, 74 | update: update, 75 | setVisible:setVisible 76 | } 77 | })(); 78 | -------------------------------------------------------------------------------- /src/js/cms_view_floats/AddElementsBtnSet.js: -------------------------------------------------------------------------------- 1 | 2 | AddElementsBtnSet = (function(){ 3 | var view; 4 | var v = {}; 5 | var _delay 6 | 7 | function init(){ 8 | view = $('#AddElementsBtnSet'); 9 | 10 | var tag = ""; 11 | tag += '
'; 12 | tag += '
'; 13 | // tag += '
'; 14 | // tag += '
'; 15 | view.html(tag) 16 | 17 | // stageInit(); 18 | setBtn(); 19 | } 20 | 21 | /* ---------- ---------- ---------- */ 22 | 23 | function setBtn(){ 24 | 25 | v._01 = view.find('._01') 26 | v._02 = view.find('._02') 27 | 28 | v._01.click(function(){ openGadgetList() }); 29 | v._02.click(function(){ openMyPreset() }); 30 | 31 | view.find('._btn_guide_01').click(function(){CMS_GuideU.openGuide("block/gadget"); }); 32 | view.find('._btn_guide_02').click(function(){CMS_GuideU.openGuide("block/preset"); }); 33 | } 34 | 35 | function openGadgetList(){ 36 | GadgetListView.stageIn(function(_type,_param){ 37 | setTimeout(function(){ 38 | if(_type == "_repeat"){ 39 | AddElementsManager.addElement_by_object(_param); 40 | } else{ 41 | AddElementsManager.addElement(_type,""); 42 | } 43 | },200); 44 | }) 45 | } 46 | function openMyPreset(){ 47 | PresetStageView.stageIn() 48 | } 49 | 50 | function addElement(_param){ 51 | setTimeout(function(){ 52 | AddElementsManager.addElement_by_object(_param); 53 | },200); 54 | } 55 | 56 | return { 57 | init: init 58 | } 59 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_floats/AddElementsManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * エレメントの新規挿入時の位置の管理や、挿入を行う 3 | */ 4 | 5 | AddElementsManager = (function() { 6 | var currentTar; 7 | var currentNo; 8 | 9 | function setData(_tar, _no) { 10 | currentTar = _tar; 11 | currentNo = _no; 12 | } 13 | 14 | function addElement(_type, _param) { 15 | hideFloatView(); 16 | var o = PageElement_Util.getInitData(_type, _param); 17 | currentTar.addDataAt(o, currentNo + 1); 18 | if (_type == "object.tabList") { 19 | currentTar.addDataAt(JSON.parse(PageElement_JText.tabListData01), currentNo + 2); 20 | currentTar.addDataAt(JSON.parse(PageElement_JText.tabListData02), currentNo + 2); 21 | currentTar.addDataAt(JSON.parse(PageElement_JText.tabListData03), currentNo + 2); 22 | } 23 | currentTar.update(); 24 | currentTar.select(currentNo + 1); 25 | } 26 | 27 | function addElement_by_object(_param) { 28 | hideFloatView(); 29 | currentTar.addDataAt(_param, currentNo + 1); 30 | currentTar.update(); 31 | currentTar.select(currentNo + 1); 32 | } 33 | return { 34 | setData: setData, 35 | addElement: addElement, 36 | addElement_by_object: addElement_by_object 37 | } 38 | })(); 39 | -------------------------------------------------------------------------------- /src/js/cms_view_floats/Float_DateInputView.js: -------------------------------------------------------------------------------- 1 | var Float_DateInputView = (function(){ 2 | var view; 3 | var v = {}; 4 | 5 | function init(){ 6 | view = $('#Float_DateInputView'); 7 | stageInit(); 8 | } 9 | 10 | function createlayout(){ 11 | var tag = "" 12 | tag += '
'; 13 | tag += '
' 14 | view.html(tag); 15 | v.body = view.find('._body'); 16 | v.date = view.find('._date'); 17 | // 18 | v._btn_close = view.find('._btn_close'); 19 | setBtn(); 20 | } 21 | function setBtn(){ 22 | v._btn_close.click(function(){ stageOut() }); 23 | } 24 | 25 | /* ---------- ---------- ---------- */ 26 | 27 | var curretDate = "" 28 | function setValue(_s){ 29 | curretDate = _s; 30 | v.date.datetimepicker({ 31 | value:curretDate, 32 | format:'Y/m/d H:i', 33 | inline:true, 34 | lang:'ja', 35 | onChangeDateTime: function( dp,$input ){ 36 | updateValue(dp,$input) 37 | } 38 | }); 39 | } 40 | 41 | function updateValue(dp,$input){ 42 | curretDate = $input.val(); 43 | callback(curretDate); 44 | stageOut(); 45 | } 46 | 47 | /* ---------- ---------- ---------- */ 48 | 49 | var isOpen = false; 50 | var isFirst = true; 51 | function stageInit(){ 52 | view.hide(); 53 | } 54 | var callback 55 | function stageIn(_s,_callback,_xy){ 56 | if(view === undefined) return; 57 | callback = _callback; 58 | if(isFirst){ 59 | createlayout(); 60 | isFirst = false; 61 | } 62 | view.show(); 63 | if(CMS_StatusW-300 < _xy[0]){_xy[0] = CMS_StatusW-300} 64 | view.css("left",_xy[0]); 65 | view.css("top",_xy[1]); 66 | setValue(_s); 67 | } 68 | function stageOut(){ 69 | if(view === undefined) return; 70 | view.hide(); 71 | } 72 | 73 | return { init:init, stageIn:stageIn, stageOut:stageOut } 74 | })();// 75 | 76 | -------------------------------------------------------------------------------- /src/js/cms_view_floats/Float_Preview.2.js: -------------------------------------------------------------------------------- 1 | 2 | var Float_PreviewTab = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#Float_PreviewTab'); 8 | stageInit(); 9 | createlayout(); 10 | setBtn(); 11 | } 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | function createlayout(){ 16 | var tag = ""; 17 | tag += '
'; 18 | view.html(tag) 19 | v.inner = view.find('._inner'); 20 | } 21 | 22 | function setBtn(){ 23 | 24 | view.hover(function(){ 25 | if(tID) clearTimeout(tID) 26 | } , function(){ 27 | stageOut(); 28 | }) 29 | } 30 | 31 | /* ---------- ---------- ---------- */ 32 | 33 | function update(_x,_param){ 34 | updatePos(_x); 35 | var tag = '' 36 | tag += '{NAME} ' 37 | if(_param.type == "page"){ 38 | tag += '{URL_ABS}' 39 | } 40 | var name = (_param.name) ? _param.name :_param.id; 41 | v.inner.html(name); 42 | var tempP = { 43 | name :name, 44 | id :_param.id, 45 | dir :_param.dir, 46 | prevPub :"" 47 | } 48 | v.inner.html( Float_Preview.DoTemplate( tag , tempP )); 49 | } 50 | 51 | /* ---------- ---------- ---------- */ 52 | var isHover = false 53 | function updatePos(_x){ 54 | view.css("left", _x + "px"); 55 | view.hover( 56 | function(){ 57 | isHover = true; 58 | }, 59 | function(){ 60 | isHover = false; 61 | stageOut() 62 | } 63 | ) 64 | } 65 | 66 | /* ---------- ---------- ---------- */ 67 | 68 | var isOpen = false; 69 | var isFirst = true; 70 | function stageInit(){ 71 | view.hide(); 72 | } 73 | function stageIn(_x,_param){ 74 | view.show(); 75 | update(_x,_param) 76 | } 77 | var tID 78 | function stageOut(){ 79 | if(isHover)return; 80 | view.hide(); 81 | } 82 | function stageOut_core(){ 83 | if(tID) clearTimeout(tID) 84 | view.hide(); 85 | } 86 | return { 87 | init: init, 88 | stageIn: stageIn, 89 | stageOut: stageOut, 90 | stageOut_core: stageOut_core 91 | } 92 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_floats/Float_Preview.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/js/cms_view_floats/SimpleToolTip.js: -------------------------------------------------------------------------------- 1 | 2 | var SimpleToolTip = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(){ 7 | view = $('#SimpleToolTip'); 8 | stageInit(); 9 | createlayout(); 10 | setBtn(); 11 | } 12 | 13 | /* ---------- ---------- ---------- */ 14 | 15 | function createlayout(){ 16 | } 17 | 18 | function setBtn(){ 19 | } 20 | 21 | 22 | /* ---------- ---------- ---------- */ 23 | 24 | function update(_xy,_html){ 25 | view.css("left",_xy.x) 26 | view.css("top",_xy.y) 27 | view.html(_html) 28 | } 29 | 30 | 31 | /* ---------- ---------- ---------- */ 32 | 33 | var isOpen = false; 34 | var isFirst = true; 35 | function stageInit(){ 36 | view.hide(); 37 | } 38 | function stageIn(_xy,_html){ 39 | // if(! isOpen){ isOpen = true; 40 | view.show(); 41 | if(isFirst){} 42 | isFirst = false; 43 | update(_xy,_html); 44 | // } 45 | } 46 | function stageOut(){ 47 | // if(isOpen){ isOpen = false; 48 | view.hide(); 49 | view.html("") 50 | // } 51 | } 52 | 53 | return { init:init, stageIn:stageIn, stageOut:stageOut } 54 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_imagemap/ImageMap.05.js: -------------------------------------------------------------------------------- 1 | 2 | ImageMap.LayersView = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | /* ---------- ---------- ---------- */ 7 | //初期化 8 | 9 | function init(_view){ 10 | view = _view; 11 | createlayout(); 12 | setBtn(); 13 | } 14 | 15 | /* ---------- ---------- ---------- */ 16 | //レイアウト作成・イベントアサイン 17 | 18 | function createlayout(){ } 19 | 20 | function setBtn(){ } 21 | 22 | /* ---------- ---------- ---------- */ 23 | 24 | function reset(){ 25 | 26 | } 27 | 28 | /* ---------- ---------- ---------- */ 29 | 30 | var items 31 | var layers 32 | function update(_items){ 33 | items = _items; 34 | layers = []; 35 | view.empty(); 36 | var leng = items.length 37 | for (var i = leng-1; i >= 0 ; i--) { 38 | var layer = new ImageMap.LayerClass(); 39 | layer.setData(items[i],i); 40 | view.append(layer.getView()); 41 | layers.push(layer); 42 | } 43 | } 44 | 45 | /* ---------- ---------- ---------- */ 46 | 47 | var currentLayer; 48 | var currentItem; 49 | function selectedItem(_select){ 50 | if(currentLayer) currentLayer.unselect(); 51 | var leng = items.length; 52 | for (var i = 0; i < leng ; i++) { 53 | if(items[i] == _select){ 54 | if(layers[(leng-1)-i]){ 55 | currentLayer = layers[(leng-1)-i]; 56 | currentLayer.select(); 57 | currentItem = _select; 58 | currentItem.layer = currentLayer; 59 | } 60 | } 61 | } 62 | } 63 | 64 | return { 65 | init:init, 66 | reset:reset, 67 | update:update, 68 | selectedItem:selectedItem 69 | } 70 | })(); 71 | 72 | 73 | /* ---------- ---------- ---------- */ 74 | 75 | -------------------------------------------------------------------------------- /src/js/cms_view_imagemap/ImageMap.u5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_imagemap/ImageMap.u5.js -------------------------------------------------------------------------------- /src/js/cms_view_inspect/InspectView.AnchorClass.js: -------------------------------------------------------------------------------- 1 | 2 | InspectView.AnchorClass = (function(){ 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_a,_b,_c,_d) { 5 | this.init(_a,_b,_c,_d); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.type 11 | p.view 12 | p.val 13 | p.callback 14 | 15 | p.init = function(_view,_val,_callback) { 16 | if(_view.size() == 0)return; 17 | this.view = _view; 18 | this.val = _val; 19 | this.callback = _callback; 20 | this.setData(); 21 | this.update(this.val); 22 | } 23 | p.setData = function() { 24 | var this_ = this; 25 | //リンク設定の場合 26 | this.view.off("click"); 27 | this.view.click(function(event){ 28 | Anchor_InputView.stageIn(this_.val,function(_val){ 29 | this_.val = _val 30 | this_.update(this_.val); 31 | this_.callback(this_.val); 32 | }) 33 | event.stopPropagation(); 34 | event.preventDefault(); 35 | }); 36 | } 37 | p.update = function(_val) { 38 | var tag = CMS_AnchorU.getViewTag(_val,false); 39 | this.view.html(tag); 40 | } 41 | p.getVal = function() { 42 | return this.val; 43 | } 44 | 45 | return c; 46 | })(); 47 | -------------------------------------------------------------------------------- /src/js/cms_view_inspect/InspectView.Tab.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_inspect/InspectView.Tab.js -------------------------------------------------------------------------------- /src/js/cms_view_inspect/InspectView.TextAnchorClass.js: -------------------------------------------------------------------------------- 1 | 2 | InspectView.TextAnchorClass = (function(){ 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_a,_b,_c,_d) { 5 | this.init(_a,_b,_c,_d); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.type 11 | p.view 12 | p.val 13 | p.callback 14 | 15 | p.init = function(_view,_val,_callback) { 16 | if(_view.size() == 0)return; 17 | this.view = _view; 18 | this.val = _val; 19 | this.callback = _callback; 20 | this.setData(); 21 | this.update(this.val); 22 | } 23 | p.setData = function() { 24 | var this_ = this; 25 | //ボタン設定の場合 26 | this.view.click(function(event){ 27 | event.stopPropagation(); 28 | event.preventDefault(); 29 | Anchor_BtnView.stageIn(this_.val,function(_val){ 30 | this_.val = _val 31 | this_.update(this_.val); 32 | this_.callback(this_.val); 33 | }) 34 | }); 35 | } 36 | p.update = function(_val) { 37 | var tag = CMS_AnchorU.getViewTag(_val,false) 38 | this.view.html(tag); 39 | } 40 | 41 | return c; 42 | })(); 43 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/BatchPublishQueueClass.js: -------------------------------------------------------------------------------- 1 | 2 | //バッチ用のキュー 3 | var BatchPublishPagesQueueClass = (function() { 4 | /* ---------- ---------- ---------- */ 5 | var c = function(_i,_pages) { 6 | this.init(_i,_pages); 7 | } 8 | var p = c.prototype; 9 | /* ---------- ---------- ---------- */ 10 | 11 | p.init = function(_i,_pages) { 12 | this.no = _i; 13 | this.pages = _pages; 14 | } 15 | p.queue = function(_callback) { 16 | this.callback = _callback; 17 | var this_ = this; 18 | var storage = new Storage.OnlineBatch(this.pages); 19 | storage.start(function(){ 20 | this_.callback(); 21 | }); 22 | } 23 | 24 | return c; 25 | })(); 26 | 27 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/BatchQueueControllClass.js: -------------------------------------------------------------------------------- 1 | //バッチ用のキューコントローラ 2 | var BatchQueueControllClass = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_a,_row) { 5 | this.init(_a,_row); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | p.max 10 | p.current 11 | p.callback 12 | p.interval 13 | 14 | p.init = function(_a,_row){ 15 | this.list = []; 16 | var row = _row; 17 | var pages = [] 18 | this.max = Math.ceil(_a.length / row); 19 | for(var i = 0; i < this.max; i++) { 20 | var n = i * row; 21 | var p = _a.slice(n, n + row); 22 | pages.push(p); 23 | } 24 | 25 | for (var i = 0; i < pages.length ; i++) { 26 | this.list.push(new BatchPublishPagesQueueClass(i,pages[i])) 27 | } 28 | } 29 | p.isLive 30 | p.stop = function() { 31 | clearInterval(this.tID); 32 | this.isLive = false; 33 | } 34 | p.start = function(_interval,_callbackOne,_callbackAll) { 35 | this.callbackOne = _callbackOne; 36 | this.callbackAll = _callbackAll; 37 | this.interval = _interval; 38 | this.isLive = true; 39 | this.current = 0; 40 | this.next() 41 | } 42 | p.next = function() { 43 | if(this.isLive == false) return; 44 | var this_ = this; 45 | this.callbackOne(this.current,this.list[this.current]); 46 | this.list[this.current].queue(function(){ 47 | this_.nexted() 48 | }) 49 | } 50 | p.nexted = function() { 51 | this.current++; 52 | if(this.current > this.max-1){ 53 | this.callbackAll(); 54 | } else{ 55 | this.next_pre() 56 | } 57 | } 58 | p.tID 59 | p.next_pre = function() { 60 | var this_ = this; 61 | if(this.interval == 0){ 62 | this.next() 63 | } else{ 64 | this.tID = setTimeout(function(){ 65 | this_.next() 66 | },this.interval); 67 | } 68 | } 69 | return c; 70 | })(); 71 | 72 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/CMS_LogView.js: -------------------------------------------------------------------------------- 1 | var CMS_LogView = (function(){ 2 | var view; 3 | var v = {}; 4 | 5 | function init(){ 6 | view = $('#CMS_LogView'); 7 | stageInit(); 8 | } 9 | 10 | /* ---------- ---------- ---------- */ 11 | 12 | function log(_s){ 13 | stageIn(); 14 | view.html(_s); 15 | } 16 | /* ---------- ---------- ---------- */ 17 | 18 | var isOpen = false; 19 | var isFirst = true; 20 | function stageInit(){ 21 | view.hide(); 22 | } 23 | function stageIn(){ 24 | if(! isOpen){ isOpen = true; 25 | view.show(); 26 | if(isFirst){} 27 | isFirst = false; 28 | } 29 | } 30 | function stageOut(){ 31 | if(isOpen){ isOpen = false; 32 | view.hide(); 33 | } 34 | } 35 | return { 36 | init: init, 37 | log: log, 38 | stageIn: stageIn, 39 | stageOut: stageOut 40 | } 41 | })(); 42 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/CustomListPresetView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/CustomListPresetView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/Editer_SingleView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/Editer_SingleView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/Editer_TextareaView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/Editer_TextareaView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/FileManagerAPI.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/FileManagerAPI.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/FileManagerPreview.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/FileManagerPreview.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/FileManagerView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/FileManagerView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/FileManagerView.p2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/FileManagerView.p2.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/FileManagerView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/FileManagerView.p3.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MiniEditer.Editors.js: -------------------------------------------------------------------------------- 1 | 2 | MiniEditer.Editors = (function(){ 3 | var view; 4 | var v = {}; 5 | 6 | function init(_parentView){ 7 | view = $('
'); 8 | _parentView.append(view); 9 | } 10 | 11 | var editors = {} 12 | var callback; 13 | 14 | var prevEditor; 15 | var currentEditor; 16 | var initTID; 17 | function setData(_s,_type,_callback){ 18 | callback = _callback; 19 | 20 | if(currentEditor)currentEditor.stageOut() 21 | if(! editors[_type]){ 22 | var t = _type.split(":")[1]; 23 | if(_type.indexOf("input:") != -1){ 24 | currentEditor = new MiniEditer.InputView(view,t); 25 | } else{ 26 | //multi,table 27 | currentEditor = new MiniEditer.CodeView(view,t); 28 | } 29 | editors[_type] = currentEditor; 30 | } else{ 31 | currentEditor = editors[_type]; 32 | } 33 | 34 | //データセット時のアップデートをスルーする処理 35 | var isUpdateable = false; 36 | if(initTID) clearTimeout(initTID); 37 | initTID = setTimeout(function() { 38 | isUpdateable = true; 39 | }, 100); 40 | 41 | currentEditor.stageIn(); 42 | currentEditor.setData(_s,function(_s){ 43 | if(!isUpdateable) return; 44 | callback(_s); 45 | }); 46 | 47 | resize(); 48 | 49 | } 50 | 51 | var currentH = 150; 52 | function resize(_h){ 53 | if(_h) currentH = _h; 54 | currentEditor.resize(currentH); 55 | } 56 | 57 | return { 58 | init: init, 59 | setData: setData, 60 | resize: resize 61 | } 62 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_modals/ModalViewCreater.js: -------------------------------------------------------------------------------- 1 | 2 | var ModalViewCreater = (function(){ 3 | function createBaseView(_class,_view){ 4 | var tag = ""; 5 | tag += '
'; 6 | tag += '
'; 7 | tag += '
'; 8 | tag += '
'; 9 | tag += '
'; 10 | tag += ' '; 11 | tag += '
'; 12 | tag += '
'; 13 | _view.append(tag); 14 | var v = {} 15 | v.header = _view.find("._header ._replaceArea"); 16 | v.header_ex = _view.find("._header_ex ._replaceArea"); 17 | v.body = _view.find("._body ._replaceArea"); 18 | v.footer = _view.find("._footer ._replaceArea"); 19 | v.extra = _view.find("._extra ._replaceArea"); 20 | return v; 21 | } 22 | 23 | return { 24 | createBaseView:createBaseView 25 | } 26 | })(); -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyPresetAddView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyPresetAddView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyPresetListView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyPresetListView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyPresetListViewClass.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyPresetListViewClass.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyPresetListViewClass2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyPresetListViewClass2.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyPresetPreView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyPresetPreView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/MyTagListView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/MyTagListView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/PresetStageView.3.js: -------------------------------------------------------------------------------- 1 | 2 | var PresetStage_PagesView = (function(){ 3 | 4 | var view; 5 | 6 | function init(){ 7 | view = $('#PresetStage_PagesView'); 8 | } 9 | 10 | /* ---------- ---------- ---------- */ 11 | 12 | function _has_ps (_id){ 13 | for (var i = 0; i < _ids.length ; i++) { 14 | if(_ids[i] == _id) return true; 15 | } 16 | return false; 17 | } 18 | 19 | /* ---------- ---------- ---------- */ 20 | 21 | var _ids = []; 22 | var _ps = []; 23 | var _current; 24 | 25 | function openPage (_param){ 26 | if(_has_ps(_param.id) == false){ 27 | _ids.push(_param.id); 28 | _ps.push(new PresetStage_PageClass(view, _param)); 29 | } 30 | for (var i = 0; i < _ids.length ; i++) { 31 | if(_ids[i] == _param.id) { 32 | _current = _ps[i]; 33 | _ps[i].stageIn(); 34 | } else{ 35 | _ps[i].stageOut(); 36 | } 37 | } 38 | 39 | } 40 | function save (){ 41 | if(_current){ 42 | _current.saveData(); 43 | } 44 | } 45 | 46 | /* ---------- ---------- ---------- */ 47 | 48 | var isOpen = false; 49 | var isFirst = true; 50 | function stageInit(){ 51 | view.hide(); 52 | } 53 | function stageIn(_pageModel){ 54 | if(! isOpen){ isOpen = true; 55 | view.show(); 56 | openPage(_pageModel); 57 | } 58 | } 59 | function stageOut(){ 60 | if(isOpen){ isOpen = false; 61 | view.hide(); 62 | } 63 | } 64 | 65 | return { 66 | init: init, 67 | save: save, 68 | stageIn: stageIn, 69 | stageOut: stageOut 70 | } 71 | })(); 72 | 73 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/PresetStageView.4.js: -------------------------------------------------------------------------------- 1 | 2 | var PresetStage_PageClass = (function() { 3 | /* ---------- ---------- ---------- */ 4 | var c = function(_view,_pageModel) { 5 | this.init(_view,_pageModel); 6 | } 7 | var p = c.prototype; 8 | /* ---------- ---------- ---------- */ 9 | 10 | p.init = function(_view,_pageModel) { 11 | this.parentView = _view; 12 | this.pageModel = _pageModel; 13 | this.id = this.pageModel.id; 14 | this.dir = this.pageModel.dir; 15 | this.type = this.pageModel.type; 16 | 17 | var this_ = this; 18 | this.storageClass = new Storage.Online(this.type, this.id, this.dir, {}); 19 | this.storageClass.load(function() { 20 | this_.loadData(); 21 | }); 22 | } 23 | 24 | p.loadData = function() { 25 | this.pageView = new EditableView.PageView (this.pageModel,this.storageClass,this.parentView); 26 | this.pageView.stageIn(); 27 | } 28 | p.saveData =function () { if(this.pageView) this.pageView.saveData() } 29 | 30 | /* ---------- ---------- ---------- */ 31 | 32 | p.stageInit = function() {} 33 | 34 | p.stageIn = function() { 35 | if(this.pageView){ 36 | this.pageView.stageIn(); 37 | } 38 | } 39 | p.stageOut = function() { 40 | if(this.pageView){ 41 | this.pageView.stageOut(); 42 | } 43 | } 44 | p.remove = function() { 45 | if(this.pageView){ 46 | this.isShow = false; 47 | this.pageView.remove(); 48 | } 49 | } 50 | return c; 51 | })(); 52 | -------------------------------------------------------------------------------- /src/js/cms_view_modals/PresetStageView.5.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/PresetStageView.5.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/Preset_CSSView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/Preset_CSSView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/Preset_ClassView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/Preset_ClassView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploadU.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/UploadU.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploadView.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/UploadView.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploadView.p2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/UploadView.p2.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploadView.p3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/UploadView.p3.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploaderState.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/js/cms_view_modals/UploaderState.js -------------------------------------------------------------------------------- /src/js/cms_view_modals/UploaderU.js: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------- /src/js/copyright.js: -------------------------------------------------------------------------------- 1 | /** 2 | * JS_CMS -- realtime website development web application 3 | * http://js-cms.jp/ 4 | * Copyright 2018 Shige Tanaka - tanaka@pixelimage.jp 5 | * licensed under the MIT licenses. 6 | */ 7 | 8 | -------------------------------------------------------------------------------- /src/sass/_01_reset.scss: -------------------------------------------------------------------------------- 1 | 2 | body ,h1, h2, h3, h4, h5, h6, p, ol, ul, li,blockquote, pre, a,div{ 3 | margin: 0; 4 | padding: 0; 5 | font-size:100%; 6 | line-height: inherit; 7 | box-sizing: border-box; 8 | } 9 | body { 10 | line-height: 1; 11 | word-break:break-all; 12 | } 13 | 14 | ol, ul { 15 | list-style: none; 16 | } 17 | table { 18 | border-collapse: separate; 19 | border-spacing: 0; 20 | } 21 | th, td { 22 | vertical-align: top; 23 | text-align:left; 24 | font-weight: normal; 25 | } 26 | img { 27 | border: 0; 28 | vertical-align: bottom; 29 | } 30 | 31 | :focus { outline: 0;} 32 | a{ color:#4A66A0;} 33 | 34 | /* ! ---------- ---------- ---------- ---------- ---------- */ 35 | 36 | ._left{ float: left;} 37 | ._right{ float: right;} 38 | .clear{ clear:both; } 39 | .clearfix:after { 40 | visibility: hidden; 41 | display: block; 42 | font-size: 0; 43 | content: " "; 44 | clear: both; 45 | height: 0; 46 | } 47 | 48 | /* ! ---------- ---------- ---------- ---------- ---------- */ 49 | 50 | body { 51 | line-height:1; 52 | font-size:14px; 53 | background: #dbe1eb; 54 | } 55 | body, 56 | input, 57 | textarea{ 58 | font-family: Helvetica , Arial , Verdana , "游ゴシック" , "Yu Gothic" , "游ゴシック体" , "YuGothic" , "メイリオ" , Meiryo , sans-serif; 59 | } 60 | 61 | body .CodeMirror{ 62 | font-family: Menlo , Verdana , "メイリオ" , Meiryo; 63 | } 64 | 65 | /* ! ---------- ---------- ---------- ---------- ---------- */ 66 | 67 | ._replaceAreaGrid, 68 | ._freeLayoutRoot, 69 | #CMS_LOCK, 70 | #CMS_Header, 71 | #CMS_PageListView, 72 | #CMS_PagesView ._page_header, 73 | #CMS_SidePreview, 74 | #CMS_SidePreviewClose, 75 | #CMS_AssetStage, 76 | #FreeLayoutInfoView, 77 | #MiniEditer, 78 | #ImageMapView{ 79 | user-select: none; 80 | } 81 | -------------------------------------------------------------------------------- /src/sass/_10_form.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | input,textarea { 4 | border: 1px solid #d1d9e6; 5 | border-bottom: none; 6 | border-right: none; 7 | padding:5px 4px 4px 2px; 8 | background: #ffe; 9 | margin: 0; 10 | border-radius: 3px; 11 | box-shadow: inset 0 0 1px rgba(0,0,0,0.1); 12 | box-sizing: border-box; 13 | } 14 | textarea{line-height: 1.4;overflow-x: hidden;overflow-y: auto;} 15 | input:focus, 16 | textarea:focus { background: #ffd } 17 | input._edited,textarea._edited{background: #ffa;} 18 | input[type="checkbox"] { border: none;} 19 | 20 | ._color-style { background: #f4f3ff; border-top: 2px solid #b2e1ff; border-bottom: 1px solid #f3faff; color: #4A66A0; } 21 | ._color-style:focus { background: #f4f3ff } 22 | ._color-js { color: #ccc; background: #333; } 23 | ._color-js:focus { background: #333 } 24 | ._color-html{ background:rgba(238,238,238,1);color: #888; font-weight: bold; } 25 | ._color-html:focus { background: rgba(230,230,230,1) } 26 | 27 | input._color-style::-webkit-input-placeholder { color: #9db0cd;font-size:12px;} 28 | input._color-style:-ms-input-placeholder { color: #9db0cd;font-size:12px;} 29 | textarea._color-style::-webkit-input-placeholder { color: #9db0cd } 30 | textarea._color-style:-ms-input-placeholder { color: #9db0cd } 31 | 32 | input:-ms-input-placeholder { color: #999!important; } 33 | textarea:-ms-input-placeholder { color: #999!important; } -------------------------------------------------------------------------------- /src/sass/_10_view.pageStage.scss: -------------------------------------------------------------------------------- 1 | 2 | /* ! ---------- #CMS_PageStage ---------- ---------- ---------- ---------- */ 3 | 4 | #CMS_PageStage { position: fixed; top: 40px; left: 0; right: 40px; bottom: 40px;} 5 | -------------------------------------------------------------------------------- /src/sass/_10_view.settingStage.list.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/sass/_10_view.settingStage.list.scss -------------------------------------------------------------------------------- /src/sass/_10_view.settingStage.page.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/sass/_10_view.settingStage.page.scss -------------------------------------------------------------------------------- /src/sass/_10_view.side.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/sass/_10_view.side.scss -------------------------------------------------------------------------------- /src/sass/_20_view.page.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pixelimage/js-cms/10b2eb4a1942e12c33714d3bdc4ff978c14485a8/src/sass/_20_view.page.scss -------------------------------------------------------------------------------- /src/sass/_40_responsive.scss: -------------------------------------------------------------------------------- 1 | 2 | #CMS_Header ._header_btns, 3 | #CMS_PagesView, 4 | #CMS_IntroView, 5 | #AddElements, 6 | #CMS_Asset_FilesArea { left: 220px;} 7 | 8 | #CMS_PageListView, 9 | #CMS_Asset_DirArea, 10 | #CMS_AssetStageClose ._header { width: 220px;} 11 | 12 | ._asset_list ._btn_page, 13 | ._listItem ._btn_page, 14 | ._listItem ._btn_dir { font-size: 12px;} 15 | 16 | /* 17 | #CMS_PageListView ._header ._header_title ._title { width: 150px;} 18 | */ 19 | #CMS_Header ._sitename { width: 200px;} 20 | 21 | @media screen and (max-width: $breakPointMM) { 22 | 23 | #CMS_Header ._header_btns, 24 | #CMS_PagesView, 25 | #CMS_IntroView, 26 | #AddElements, 27 | #CMS_Asset_FilesArea{ left: 170px;} 28 | #CMS_PageListView, 29 | #CMS_Asset_DirArea, 30 | #CMS_AssetStageClose ._header { width: 170px;} 31 | 32 | /* 33 | #CMS_PageListView ._header ._header_title ._title { width: 100px;} 34 | */ 35 | #CMS_Header ._sitename { width: 150px;} 36 | 37 | ._hide_S{display: none;} 38 | ._asset_list ._btn_page, 39 | ._listItem ._btn_page, 40 | ._listItem ._btn_dir { font-size: 11px;} 41 | } 42 | 43 | 44 | /* ---------- ---------- ---------- */ 45 | 46 | #Float_PreviewFull, 47 | #Float_PreviewMini { left: 215px} 48 | 49 | body._wideNavi #Float_PreviewFull, 50 | body._wideNavi #Float_PreviewMini { left: 745px} 51 | 52 | 53 | @media screen and (max-width: $breakPointMM) { 54 | #Float_PreviewFull, 55 | #Float_PreviewMini { left: 165px} 56 | } 57 | 58 | 59 | /* ---------- ---------- ---------- */ 60 | 61 | /* 汎用 */ 62 | 63 | @media screen and (max-width: $breakPointMM) { 64 | ._cms_wide{ display: none!important;} 65 | } 66 | 67 | /* ---------- ---------- ---------- */ 68 | /* プレビュー表示時に非表示*/ 69 | ._cms_hide_preview{} 70 | body._openPreview ._cms_hide_preview{display: none;} 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/sass/_50_zindex.scss: -------------------------------------------------------------------------------- 1 | 2 | #CMS_Header{ z-index: 9500;} 3 | #Float_PreviewTab { z-index: 5500;} 4 | 5 | #PresetStageView { z-index: 3000;} 6 | 7 | #InspectView{z-index: 4000; } 8 | #AddElementsView{z-index: 4100; } 9 | #AddElementsView{z-index: 4101; } 10 | #Float_DateInputView {z-index: 21000;} 11 | #Float_DateInputView ._btn_close {z-index: 21100;} 12 | 13 | 14 | 15 | #CMS_PagesView ._page_header{z-index: 9000;} 16 | 17 | #TreeViewMakerView{z-index: 9000; } 18 | ._modalView{z-index: 10000; } 19 | 20 | 21 | #ImageMapView, 22 | #ImageMapInspectView, 23 | #InputCnadidate, 24 | #ColorPickerView{z-index: 10000;} 25 | 26 | #CMS_PageListBgView { z-index: 10000;} 27 | 28 | #CMS_AssetStageResizeView { z-index: 2000;} 29 | #CMS_SidePreview { z-index: 3000;} 30 | 31 | #Editer_JSONView, 32 | #Editer_CodeCopyView, 33 | #Editer_TAGView {z-index: 30000;} 34 | 35 | #GridDetailView{z-index: 20000;} 36 | 37 | #Anchor_InputView, 38 | #Anchor_BtnView, 39 | #Anchor_PageListView, 40 | #Anchor_TargetListView, 41 | #DirListView {z-index: 40000;} 42 | 43 | #MiniEditer { z-index: 40500;} 44 | #Preset_CSSView { z-index: 40700;} 45 | #SimpleToolTip, 46 | #Preset_IconView, 47 | #ServerInfoView, 48 | #BatchPublishView{z-index: 50000;} 49 | 50 | #EmbedTagListView{z-index: 50000;} 51 | 52 | #CMS_LOCK { z-index:51000;} 53 | #CMS_LOCK._unlock { z-index:6000;} 54 | 55 | #CMS_GuideView { z-index: 55000; } 56 | 57 | #CMS_AlertView, 58 | #CMS_AlertLockView, 59 | #CMS_ConfirmView, 60 | #CMS_CopyView, 61 | #CMS_InputView, 62 | #CMS_ProccessView, 63 | #CMS_ErrorView {z-index: 60000;} 64 | 65 | -------------------------------------------------------------------------------- /src/sass/_mixin.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @mixin gradient($start-color, $end-color ){ 4 | background: $start-color; 5 | background: -moz-linear-gradient(top, $start-color 0%, $end-color 100%); 6 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$start-color), color-stop(100%,$end-color)); 7 | background: -webkit-linear-gradient(top, $start-color 0%,$end-color 100%); 8 | background: -o-linear-gradient(top, $start-color 0%,$end-color 100%); 9 | background: -ms-linear-gradient(top, $start-color 0%,$end-color 100%); 10 | background: linear-gradient(to bottom, $start-color 0%,$end-color 100%); 11 | } 12 | -------------------------------------------------------------------------------- /src/sass/_setting.scss: -------------------------------------------------------------------------------- 1 | 2 | $breakPointML: 1200px; 3 | $breakPointMM: 1100px; 4 | $breakPointMS: 1000px; 5 | 6 | $colorMain:#4A66A0; 7 | $colorMainH:#00ffff; -------------------------------------------------------------------------------- /src/sass/_snipet.scss: -------------------------------------------------------------------------------- 1 | 2 | 基本 #4A66A0 rgba(54,105,161,0.15) 3 | 明るく #6a93e8 4 | #e7ebf2 5 | #dbe1eb 6 | #c2cfe0 7 | */ 8 | 9 | #0ff 10 | 11 | うすいいろ #e7ebf2 12 | ヘッダうすいいろ ##56accc 13 | 14 | 15 | 16 | color:#4A66A0; 17 | border-radius:5px; 18 | box-shadow: 0 0 10px rgba(74,102,160,0.4); 19 | 20 | -------------------------------------------------------------------------------- /src/sass/cms.scss: -------------------------------------------------------------------------------- 1 | @import url("//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"); 2 | @charset "UTF-8"; 3 | 4 | /** 5 | * JS_CMS -- realtime website development web application 6 | * http://js-cms.jp/ 7 | * Copyright 2015 Shigenori Tanaka - tanaka@pixelimage.jp 8 | * licensed under the MIT licenses. 9 | */ 10 | 11 | 12 | @import "_setting"; 13 | @import "_mixin"; 14 | 15 | /* ! ---------- リセット ---------- ---------- ---------- ---------- */ 16 | 17 | @import "_01_reset"; 18 | 19 | /* ! ---------- module ---------- ---------- ---------- ---------- */ 20 | 21 | @import "_02_base"; 22 | 23 | /* ! ---------- from ---------- ---------- ---------- ---------- */ 24 | 25 | @import "_10_form"; 26 | 27 | /* ! ---------- view ---------- ---------- ---------- ---------- */ 28 | 29 | @import "_10_view.main"; 30 | @import "_10_view.preview"; 31 | @import "_10_view.pageStage"; 32 | @import "_10_view.pageStage.page"; 33 | @import "_10_view.pageStage.list"; 34 | @import "_10_view.settingStage"; 35 | @import "_10_view.settingStage.page"; 36 | @import "_10_view.settingStage.list"; 37 | 38 | /* ! ---------- freeLayout ---------- ---------- ---------- ---------- */ 39 | 40 | @import "_20_view.freelayout"; 41 | @import "_20_view.modal"; 42 | @import "_20_view.modal2"; 43 | @import "_30_view.float"; 44 | @import "_40_view.inspect"; 45 | 46 | /* ! ---------- レスポンシブ ---------- ---------- ---------- ---------- */ 47 | 48 | @import "_40_responsive"; 49 | 50 | /* ! ---------- z-index ---------- ---------- ---------- ---------- */ 51 | 52 | @import "_50_zindex"; 53 | 54 | /* ! ---------- spriteseet ---------- ---------- ---------- ---------- */ 55 | 56 | @import "_60_spriteseet"; 57 | 58 | /* ! ---------- misk ---------- ---------- ---------- ---------- */ 59 | 60 | @import "_70_misk"; 61 | 62 | 63 | -------------------------------------------------------------------------------- /tasks/css.js: -------------------------------------------------------------------------------- 1 | 2 | var gulp = require("gulp"); 3 | var sass = require("gulp-sass"); 4 | var pleeease = require('gulp-pleeease'); 5 | var sourcemaps = require('gulp-sourcemaps'); 6 | var concat = require("gulp-concat") 7 | var runSequence = require('run-sequence'); 8 | 9 | /* ! ---------- __val__ ---------- ---------- ---------- ---------- */ 10 | 11 | var dir = './js_cms/_cms/css'; 12 | 13 | var css = { 14 | main:{ 15 | dest:'cms.css', 16 | src:[ 17 | "./src/sass/cms.scss" 18 | ] 19 | } 20 | } 21 | 22 | /* ! ---------- __val__ ---------- ---------- ---------- ---------- */ 23 | 24 | gulp.task("sass", function() { 25 | return gulp.src(css.main.src) 26 | //.pipe(sourcemaps.init()) 27 | .pipe(sass()) 28 | .pipe(pleeease({ 29 | autoprefixer: { 'browsers': ['last 2 versions','IE 9']}, 30 | mqpacker: false, 31 | minifier: false 32 | //out: 'all.min.css', 33 | })) 34 | //.pipe(sourcemaps.write('./maps')) 35 | .pipe(gulp.dest(dir)); 36 | }); 37 | 38 | gulp.task('concat:css', function(callback) { 39 | return runSequence( 40 | 'sass', 41 | callback 42 | ); 43 | }); 44 | --------------------------------------------------------------------------------