From 1d9e919301e534f0aad826d9c646963a2c30862f Mon Sep 17 00:00:00 2001 From: zh99998 <zh99998@gmail.com> Date: Thu, 8 Sep 2016 14:46:35 +0800 Subject: [PATCH] modal --- app/app-detail.component.html | 23 ++++++++++++++++++++++- index.html | 5 +++++ package.json | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/app-detail.component.html b/app/app-detail.component.html index b7f9f85..558b595 100644 --- a/app/app-detail.component.html +++ b/app/app-detail.component.html @@ -1,7 +1,7 @@ <h1>{{name}}</h1> <div *ngIf="!isInstalled"> - <button type="button" class="btn btn-primary">安装</button> + <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#install-modal">安装</button> <button type="button" class="btn btn-secondary">导入</button> <button type="button" class="btn btn-secondary">æ£ç‰ˆä»£è´</button> </div> @@ -60,3 +60,24 @@ </tbody> </table> </div> + +<!-- Modal --> +<div class="modal fade" id="install-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">安装 {{name}}</h4> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">å–消</button> + <button type="button" class="btn btn-primary">安装</button> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/index.html b/index.html index ca90fdd..c62bc6c 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,11 @@ <script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/reflect-metadata/Reflect.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> + + <script>delete module.exports</script> + <script src="node_modules/jquery/dist/jquery.min.js"></script> + <script src="node_modules/tether/dist/js/tether.min.js"></script> + <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> <!-- 2. Configure SystemJS --> <script src="systemjs.config.js"></script> <script> diff --git a/package.json b/package.json index 9c852e2..70f7fed 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "reflect-metadata": "latest", "rxjs": "latest", "systemjs": "latest", + "tether": "latest", "zone.js": "latest" }, "devDependencies": { -- 2.24.1