Subversion Repositories bacoAlunos

Rev

Rev 1830 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1830 jmachado 1
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
1848 jmachado 2
<style>
3
    .buttonTools
4
    {
5
        border: 1px solid gray;
6
        background-color: lightgray;
7
        padding: 5px;
8
    }
9
    .customComponent
10
    {
11
        padding: 0;
12
    }
13
    .documentSimpleComponent
14
    {
15
        border: 1px solid gray;
16
        padding: 5px;
17
        margin-bottom: 5px;
18
    }
19
    .componentBody
20
    {
21
        border: 1px solid gray;
22
        padding: 5px;
23
    }
24
</style>
1830 jmachado 25
 
1848 jmachado 26
 
1830 jmachado 27
<%--
28
    customPane Need component customPane in variable customPane
29
    docAppSelector selector usualy an html ID for ng-app example #docReport
30
--%>
1848 jmachado 31
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_CustomPane">
32
    <div class="customComponent clearfix component">
1830 jmachado 33
        <div class="buttonTools clearfix">
1848 jmachado 34
            <button class="btn btn-default pullleft" type="button" ng-click="addText(comp)">
1830 jmachado 35
                <span class="glyphicon glyphicon-plus"></span>
36
                <span class="glyphicon glyphicon-font"></span>
37
            </button>
38
 
1848 jmachado 39
            <button class="btn btn-default pullleft" type="button" ng-click="addImage(comp)">
1830 jmachado 40
                <span class="glyphicon glyphicon-plus"></span>
41
                <span class="glyphicon glyphicon-picture"></span>
42
            </button>
43
            Secção personalizada
44
        </div>
1848 jmachado 45
        <div class="componentBody">
46
            <div class="clearfix" ng-repeat="subComp in comp.components" ng-init="parent=comp;comp=subComp" ng-include="class2id(subComp)">
1830 jmachado 47
 
1848 jmachado 48
            </div>
49
        <div>
50
    </div>
51
</script>
1830 jmachado 52
 
1848 jmachado 53
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_ImageComponent">
54
    <div class="imageComponent component">
55
        <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix">
56
                <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)">
1830 jmachado 57
                    <span class="glyphicon glyphicon-remove"></span>
58
                </button>
1848 jmachado 59
                <label>Componente de Imagem (Use esta funcinalidade para adicionar gráficos ou tabelas que ache necessárias)</label>
60
        </div>
1830 jmachado 61
 
1848 jmachado 62
        <div class="componentBody" ng-if="comp['@class']=='pt.estgp.estgweb.utils.documentBuilder.ImageComponent'">
1830 jmachado 63
                <div class="form-group clearfix" ng-if="comp.image.identifier">
64
                    <label class="col-md-2 control-label">Legenda</label>
65
                    <div class="col-md-10">
66
                        <input type="text" class="form-control" rows="10" ng-model="comp.title">
67
                    </div>
68
                </div>
69
                <div class="form-group clearfix">
70
                    <div class="col-md-2 control-label">
71
                        <a class="btn btn-default" href="#" ng-model="comp"
1848 jmachado 72
                            data-title="Escolha Imagem"
73
                            data-showmetafields="false"
74
                            data-confirmonupload="true"
75
                            data-toggle="modal"
76
                            data-target="#filesUploadModal"
77
                            data-multiple="false"
78
                            data-allowed-extensions="jpg,png,gif"
79
                            data-callback-target-function="angular.element($('{{docAppSelector}}')).scope().callbackUploadedFiles">
1830 jmachado 80
                            <span ng-if="comp.image.identifier">
1848 jmachado 81
                                    Substituir Imagem
1830 jmachado 82
                            </span>
83
                            <span ng-if="!(comp.image.identifier)">
1848 jmachado 84
                                    Carregar Imagem
1830 jmachado 85
                            </span>
86
 
87
                            <span class="glyphicon glyphicon-upload"/>
88
 
89
                        </a>
90
                    </div>
91
 
92
                    <div class="col-md-10">
1848 jmachado 93
                            <div ng-if="!(comp.image.identifier)">
94
                            Clique em carregar imagens e escolha uma imagem para adicionar nesta secção.
1830 jmachado 95
                        </div>
96
 
97
                        <label ng-if="comp.image.identifier"> Limites do PDF </label>
98
                        <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px">
99
                            <center>
100
                                <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)">
101
                                    <img style="width: 100%;height: 100%"  ng-src="{{comp.imageUrl}}">
102
                                </div>
103
                                (Se desejar altere o tamanho da imagem arrastando no canto inferior direito)
104
                            </center>
105
                        </div>
106
                    </div>
107
            </div>
1848 jmachado 108
        </div>
109
    </div>
110
</script>
1830 jmachado 111
 
1848 jmachado 112
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_TextComponent">
113
    <div class="textComponent component">
1830 jmachado 114
 
1848 jmachado 115
        <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix">
116
            <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)">
117
                <span class="glyphicon glyphicon-remove"></span>
118
            </button>
119
            <label>Componente de Texto</label>
120
        </div>
121
        <div class="componentBody">
122
            <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="form-group clearfix">
123
                <label class="col-md-2 control-label">Titulo de Parágrafo</label>
124
                <div class="col-md-10">
125
                    <input type="text" class="form-control" rows="10" ng-model="comp.title">
1830 jmachado 126
                </div>
1848 jmachado 127
            </div>
128
            <div class="form-group clearfix">
129
                <label class="col-md-2 control-label">Texto</label>
130
                <div class="col-md-10">
131
                    <textarea class="form-control" rows="10" ng-model="comp.text">
1830 jmachado 132
 
1848 jmachado 133
                    </textarea>
1830 jmachado 134
                </div>
135
            </div>
136
        </div>
1848 jmachado 137
    </div>
1830 jmachado 138
</script>