fix: enhance delete functionality and improve UI elements in cadastro_jogos desktop XML
davinTI/jogos_matheus/pipeline/head There was a failure building this commit
davinTI/jogos_matheus/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -328,8 +328,19 @@
|
|||||||
},
|
},
|
||||||
function(action) {
|
function(action) {
|
||||||
if(action.yes()) {
|
if(action.yes()) {
|
||||||
|
try{
|
||||||
lib.fncDeletarRegistro(config_avaliacoes, itemId);
|
lib.fncDeletarRegistro(config_avaliacoes, itemId);
|
||||||
engine.getField("dbtAvaliacoes").refresh();
|
engine.getField("dbtAvaliacoes").refresh();
|
||||||
|
} catch (error) {
|
||||||
|
engine.getField("dbtAvaliacoes").refresh();
|
||||||
|
lib_msg.showNotification({
|
||||||
|
type: lib_msg.notificationType.tray,
|
||||||
|
caption: "Avaliação apagada!",
|
||||||
|
msg: "A avaliação foi apagada com sucesso.",
|
||||||
|
position: lib_msg.notificationPosition.bottom_right,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -400,7 +411,7 @@
|
|||||||
</events>
|
</events>
|
||||||
</TextField>
|
</TextField>
|
||||||
<ButtonWidget defaultIcon="SEARCH" id="btnPesquisar"
|
<ButtonWidget defaultIcon="SEARCH" id="btnPesquisar"
|
||||||
caption="Pesquisar" style="BLACK">
|
caption="Pesquisar" style="BLUE" expandRatio="0.2">
|
||||||
<onClickScript language="JavaScript">
|
<onClickScript language="JavaScript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
function run() {
|
function run() {
|
||||||
@@ -512,18 +523,30 @@
|
|||||||
},
|
},
|
||||||
function(action) {
|
function(action) {
|
||||||
if(action.yes()) {
|
if(action.yes()) {
|
||||||
|
try {
|
||||||
lib.fncDeletarRegistro(config_jogos, itemId);
|
lib.fncDeletarRegistro(config_jogos, itemId);
|
||||||
engine.getField("dbtJogos").refresh();
|
engine.getField("dbtJogos").refresh();
|
||||||
}
|
} catch (error) {
|
||||||
|
engine.getField("dbtJogos").refresh();
|
||||||
|
lib_msg.showNotification({
|
||||||
|
type: lib_msg.notificationType.tray,
|
||||||
|
caption: "Apagado!!",
|
||||||
|
msg: "O jogo foi apagado com sucesso.",
|
||||||
|
position: lib_msg.notificationPosition.bottom_right,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
},
|
);
|
||||||
"trash",
|
},
|
||||||
|
"trash",
|
||||||
);
|
);
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var script = new Generator();
|
var script = new Generator();
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</scriptColumnGenerator>
|
</scriptColumnGenerator>
|
||||||
</generated>
|
</generated>
|
||||||
@@ -540,7 +563,7 @@
|
|||||||
]]>
|
]]>
|
||||||
</onClickScript>
|
</onClickScript>
|
||||||
</ButtonWidget>
|
</ButtonWidget>
|
||||||
<ButtonWidget defaultIcon="SAVE" id="btnVerAvaliacoes" style="RED"
|
<ButtonWidget defaultIcon="STAR" id="btnVerAvaliacoes" style="ORANGE"
|
||||||
caption="Avaliações">
|
caption="Avaliações">
|
||||||
<onClickScript language="JavaScript">
|
<onClickScript language="JavaScript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -577,12 +600,18 @@
|
|||||||
<TextField id="txfTitulo" caption="Título" type="string"
|
<TextField id="txfTitulo" caption="Título" type="string"
|
||||||
width="100%"
|
width="100%"
|
||||||
required="true" minLength="3" maxLength="100" />
|
required="true" minLength="3" maxLength="100" />
|
||||||
<ComboBox id="cbbGenero" allowNullSelection="true"
|
<ComboBox id="cbbGenero" allowNullSelection="false"
|
||||||
caption="Gênero" description="ComboBox Exemplo"
|
caption="Gênero" description="ComboBox Exemplo"
|
||||||
updatable="false" required="true"
|
updatable="false" required="true"
|
||||||
visible="true" type="string" width="100%">
|
visible="true" type="string" width="100%">
|
||||||
<entry value="Ação" key="Ação" />
|
<entry value="Ação" key="Ação" />
|
||||||
<entry value="Aventura" key="Aventura" />
|
<entry value="Aventura" key="Aventura" />
|
||||||
|
<entry value="Corrida" key="Corrida" />
|
||||||
|
<entry value="Esporte" key="Esporte" />
|
||||||
|
<entry value="Estratégia" key="Estratégia" />
|
||||||
|
<entry value="Luta" key="Luta" />
|
||||||
|
<entry value="RPG" key="RPG" />
|
||||||
|
<entry value="Simulação" key="Simulação" />
|
||||||
<entry value="Terror" key="Terror" />
|
<entry value="Terror" key="Terror" />
|
||||||
<entry value="Sobrevivência" key="Sobrevivência" />
|
<entry value="Sobrevivência" key="Sobrevivência" />
|
||||||
<entry value="Infântil" key="Infântil" />
|
<entry value="Infântil" key="Infântil" />
|
||||||
|
|||||||
Reference in New Issue
Block a user