diff --git a/src/core/mainmenu/pages/more/more.ts b/src/core/mainmenu/pages/more/more.ts index 7f5b190cc..0f0b95ff8 100644 --- a/src/core/mainmenu/pages/more/more.ts +++ b/src/core/mainmenu/pages/more/more.ts @@ -110,7 +110,7 @@ export class CoreMainMenuMorePage implements OnDestroy { * @param {CoreMainMenuCustomItem} item Item to open. */ openItem(item: CoreMainMenuCustomItem) { - // @todo. + this.navCtrl.push('CoreViewerIframePage', {title: item.label, url: item.url}); } /** diff --git a/src/core/viewer/pages/iframe/iframe.html b/src/core/viewer/pages/iframe/iframe.html new file mode 100644 index 000000000..e070ebb9d --- /dev/null +++ b/src/core/viewer/pages/iframe/iframe.html @@ -0,0 +1,8 @@ + + + {{ title }} + + + + + diff --git a/src/core/viewer/pages/iframe/iframe.module.ts b/src/core/viewer/pages/iframe/iframe.module.ts new file mode 100644 index 000000000..f5cd9ddf4 --- /dev/null +++ b/src/core/viewer/pages/iframe/iframe.module.ts @@ -0,0 +1,29 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { NgModule } from '@angular/core'; +import { IonicPageModule } from 'ionic-angular'; +import { CoreViewerIframePage } from './iframe'; +import { CoreComponentsModule } from '../../../../components/components.module'; + +@NgModule({ + declarations: [ + CoreViewerIframePage + ], + imports: [ + CoreComponentsModule, + IonicPageModule.forChild(CoreViewerIframePage) + ] +}) +export class CoreViewerIframePageModule {} diff --git a/src/core/viewer/pages/iframe/iframe.ts b/src/core/viewer/pages/iframe/iframe.ts new file mode 100644 index 000000000..ba67d8d7e --- /dev/null +++ b/src/core/viewer/pages/iframe/iframe.ts @@ -0,0 +1,34 @@ +// (C) Copyright 2015 Martin Dougiamas +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Component } from '@angular/core'; +import { IonicPage, NavParams } from 'ionic-angular'; + +/** + * Page to display a URL in an iframe. + */ +@IonicPage() +@Component({ + selector: 'page-core-viewer-iframe', + templateUrl: 'iframe.html', +}) +export class CoreViewerIframePage { + title: string; // Page title. + url: string; // Iframe URL. + + constructor(params: NavParams) { + this.title = params.get('title'); + this.url = params.get('url'); + } +} \ No newline at end of file diff --git a/src/core/viewer/pages/text/text.ts b/src/core/viewer/pages/text/text.ts index 8a8d524d2..94486c69f 100644 --- a/src/core/viewer/pages/text/text.ts +++ b/src/core/viewer/pages/text/text.ts @@ -17,7 +17,7 @@ import { IonicPage, ViewController, NavParams } from 'ionic-angular'; import { CoreTextUtilsProvider } from '../../../../providers/utils/text'; /** - * Component that displays an error when trying to connect to a site. + * Page to render a certain text. If opened as a modal, it will have a button to close the modal. */ @IonicPage() @Component({