/home/techb158/ileadtechnology.com/SSM/public/js/configuration/locale
NameSizeModeActions
edit.js45730644editdlrm
edit.js.map1690644editdlrm
index.js121570644editdlrm
index.js.map1620644editdlrm
show.js53440644editdlrm
show.js.map1690644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/locale/show.js (5344B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{R7IU:function(t,o,s){"use strict";var a=s("fJPx");s.n(a).a},cfkC:function(t,o,s){"use strict";s.r(o);var a={data:function(){return{modules:{},words:{},locale:{},module:this.$route.params.module?this.$route.params.module:"auth",help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),helper.featureAvailable("multilingual")||(helper.featureNotAvailableMsg(),this.$router.push("/dashboard")),this.fetchWords()},methods:{fetchWords:function(){var t=this,o=this.$loading.show();axios.post("/api/locale/fetch",{locale:this.$route.params.locale,module:this.module}).then((function(s){t.modules=s.modules,t.words=s.words,t.locale=s.locale,o.hide()})).catch((function(s){o.hide(),helper.showErrorMsg(s),t.$router.push("/configuration/locale")}))},getName:function(t){return(t=helper.ucword(t)).replace(/_/g," ")},getModuleLink:function(t){return"/configuration/locale/"+this.$route.params.locale+"/"+t},saveTranslation:function(){var t=this.$loading.show();axios.post("/api/locale/translate",{locale:this.$route.params.locale,module:this.module,words:this.words}).then((function(o){toastr.success(o.message),t.hide()})).catch((function(o){t.hide(),helper.showErrorMsg(o)}))},getConfig:function(t){return helper.getConfig(t)},toWord:function(t){return helper.toWord(t)}},watch:{"$route.params.module":function(t,o){this.module=t,this.fetchWords()}},computed:{getWordCount:function(){return _size(this.words)}}},e=(s("R7IU"),s("KHd+")),n=Object(e.a)(a,(function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",[s("div",{staticClass:"page-titles"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6"},[s("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("configuration.translation"))+" ("+t._s(t.locale.name)+") ")])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(o){return t.$router.push("/configuration/locale")}}},[s("i",{staticClass:"fas fa-globe"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("configuration.locale")))])]),t._v(" "),s("div",{staticClass:"btn-group"},[s("button",{staticClass:"btn btn-info btn-sm",staticStyle:{"margin-top":"-5px"},attrs:{type:"button",href:"#",role:"button",id:"moduleLink","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[s("i",{staticClass:"fas fa-boxes"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("configuration.locale_module"))+" "),s("span",[t._v("("+t._s(t.toWord(t.module))+")")]),t._v(" "),s("i",{staticClass:"fas fa-chevron-down"})])]),t._v(" "),s("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moduleLink"}},t._l(t.modules,(function(o){return s("button",{staticClass:"dropdown-item",staticStyle:{cursor:"pointer"},on:{click:function(s){return t.$router.push("/configuration/locale/"+t.locale.locale+"/"+o)}}},[t._v("\n "+t._s(t.toWord(o))+" "),o==t.module?s("span",{staticClass:"pull-right"},[s("i",{staticClass:"fas fa-check"})]):t._e()])})),0)]),t._v(" "),s("help-button",{on:{clicked:function(o){t.help_topic="configuration.locale.translation"}}})],1)])])]),t._v(" "),s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body p-4"},[t.getWordCount?s("div",[s("div",{staticClass:"row"},[t._l(t.words,(function(o,a){return["object"==typeof o?t._l(o,(function(o,e){return s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{staticStyle:{color:"red"},attrs:{for:""}},[t._v(t._s(t.trans(t.module+"."+a+"."+e)))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.words[a][e],expression:"words[index][i]"}],staticClass:"form-control",attrs:{type:"text",name:a+"_"+e},domProps:{value:t.words[a][e]},on:{input:function(o){o.target.composing||t.$set(t.words[a],e,o.target.value)}}})])])})):[s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"font-weight-bold",attrs:{for:""}},[t._v(t._s(t.trans(t.module+"."+a)))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.words[a],expression:"words[index]"}],staticClass:"form-control",attrs:{type:"text",name:a},domProps:{value:t.words[a]},on:{input:function(o){o.target.composing||t.$set(t.words,a,o.target.value)}}})])])]]}))],2),t._v(" "),s("div",{staticClass:"form-group"},[s("button",{staticClass:"btn btn-info btn-sm pull-right",on:{click:t.saveTranslation}},[t._v(t._s(t.trans("general.save")))])])]):t._e(),t._v(" "),t.getWordCount?t._e():s("div",[s("p",{staticClass:"alert alert-danger"},[t._v(t._s(t.trans("general.no_result_found")))])])])])]),t._v(" "),s("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);o.default=n.exports},cjIW:function(t,o,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.list-group-item .active {color:#ffffff;}\n",""])},fJPx:function(t,o,s){var a=s("cjIW");"string"==typeof a&&(a=[[t.i,a,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,e);a.locals&&(t.exports=a.locals)}}]); //# sourceMappingURL=show.js.map?id=1358668a6a424fb2c28c