MOBILE-2302 mainmenu: Allow viewing embedded custom items
parent
f94cd92322
commit
cda02ff68e
|
@ -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});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<ion-header>
|
||||
<ion-navbar>
|
||||
<ion-title>{{ title }}</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<core-iframe [src]="url"></core-iframe>
|
||||
</ion-content>
|
|
@ -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 {}
|
|
@ -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');
|
||||
}
|
||||
}
|
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue