Subversion Repositories bacoAlunos

Rev

Rev 1857 | Rev 1902 | Go to most recent revision | 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>
52
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_ImageComponent">
53
    <div class="imageComponent component">
54
        <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix">
55
                <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)">
1830 jmachado 56
                    <span class="glyphicon glyphicon-remove"></span>
57
                </button>
1848 jmachado 58
                <label>Componente de Imagem (Use esta funcinalidade para adicionar gráficos ou tabelas que ache necessárias)</label>
59
        </div>
1830 jmachado 60
 
1848 jmachado 61
        <div class="componentBody" ng-if="comp['@class']=='pt.estgp.estgweb.utils.documentBuilder.ImageComponent'">
1830 jmachado 62
                <div class="form-group clearfix" ng-if="comp.image.identifier">
63
                    <label class="col-md-2 control-label">Legenda</label>
64
                    <div class="col-md-10">
65
                        <input type="text" class="form-control" rows="10" ng-model="comp.title">
66
                    </div>
67
                </div>
68
                <div class="form-group clearfix">
69
                    <div class="col-md-2 control-label">
70
                        <a class="btn btn-default" href="#" ng-model="comp"
1848 jmachado 71
                            data-title="Escolha Imagem"
72
                            data-showmetafields="false"
73
                            data-confirmonupload="true"
74
                            data-toggle="modal"
75
                            data-target="#filesUploadModal"
76
                            data-multiple="false"
77
                            data-allowed-extensions="jpg,png,gif"
78
                            data-callback-target-function="angular.element($('{{docAppSelector}}')).scope().callbackUploadedFiles">
1830 jmachado 79
                            <span ng-if="comp.image.identifier">
1848 jmachado 80
                                    Substituir Imagem
1830 jmachado 81
                            </span>
82
                            <span ng-if="!(comp.image.identifier)">
1848 jmachado 83
                                    Carregar Imagem
1830 jmachado 84
                            </span>
85
 
86
                            <span class="glyphicon glyphicon-upload"/>
87
 
88
                        </a>
89
                    </div>
90
 
91
                    <div class="col-md-10">
1848 jmachado 92
                            <div ng-if="!(comp.image.identifier)">
93
                            Clique em carregar imagens e escolha uma imagem para adicionar nesta secção.
1830 jmachado 94
                        </div>
95
 
96
                        <label ng-if="comp.image.identifier"> Limites do PDF </label>
97
                        <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px">
98
                            <center>
99
                                <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)">
100
                                    <img style="width: 100%;height: 100%"  ng-src="{{comp.imageUrl}}">
101
                                </div>
102
                                (Se desejar altere o tamanho da imagem arrastando no canto inferior direito)
103
                            </center>
104
                        </div>
105
                    </div>
106
            </div>
1848 jmachado 107
        </div>
108
    </div>
109
</script>
1830 jmachado 110
 
1848 jmachado 111
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_TextComponent">
112
    <div class="textComponent component">
1830 jmachado 113
 
1848 jmachado 114
        <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="buttonTools clearfix">
115
            <button class="btn btn-danger pull-right" type="button" ng-click="removeComponent($index,parent.components)">
116
                <span class="glyphicon glyphicon-remove"></span>
117
            </button>
118
            <label>Componente de Texto</label>
119
        </div>
120
        <div class="componentBody">
121
            <div ng-if="parent['@class']=='pt.estgp.estgweb.utils.documentBuilder.CustomPane'" class="form-group clearfix">
122
                <label class="col-md-2 control-label">Titulo de Parágrafo</label>
123
                <div class="col-md-10">
124
                    <input type="text" class="form-control" rows="10" ng-model="comp.title">
1830 jmachado 125
                </div>
1848 jmachado 126
            </div>
127
            <div class="form-group clearfix">
128
                <label class="col-md-2 control-label">Texto</label>
129
                <div class="col-md-10">
130
                    <textarea class="form-control" rows="10" ng-model="comp.text">
1830 jmachado 131
 
1848 jmachado 132
                    </textarea>
1830 jmachado 133
                </div>
134
            </div>
135
        </div>
1848 jmachado 136
    </div>
1830 jmachado 137
</script>